diff --git a/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py index d23dace4f604..f12ba0766a1e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py @@ -121,6 +121,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 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` """ if api_version == '2015-06-15': from .v2015_06_15 import models @@ -143,6 +144,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): 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 raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -154,6 +158,7 @@ def availability_sets(self): * 2016-04-30-preview: :class:`AvailabilitySetsOperations` * 2017-03-30: :class:`AvailabilitySetsOperations` * 2017-12-01: :class:`AvailabilitySetsOperations` + * 2018-04-01: :class:`AvailabilitySetsOperations` """ api_version = self._get_api_version('availability_sets') if api_version == '2015-06-15': @@ -166,6 +171,8 @@ def availability_sets(self): 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 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))) @@ -189,6 +196,45 @@ def disks(self): 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` + """ + api_version = self._get_api_version('galleries') + if api_version == '2018-06-01': + from .v2018_06_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` + """ + api_version = self._get_api_version('gallery_image_versions') + if api_version == '2018-06-01': + from .v2018_06_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` + """ + api_version = self._get_api_version('gallery_images') + if api_version == '2018-06-01': + from .v2018_06_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: @@ -196,6 +242,7 @@ def images(self): * 2016-04-30-preview: :class:`ImagesOperations` * 2017-03-30: :class:`ImagesOperations` * 2017-12-01: :class:`ImagesOperations` + * 2018-04-01: :class:`ImagesOperations` """ api_version = self._get_api_version('images') if api_version == '2016-04-30-preview': @@ -204,6 +251,8 @@ def images(self): 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 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))) @@ -213,10 +262,13 @@ def log_analytics(self): """Instance depends on the API version: * 2017-12-01: :class:`LogAnalyticsOperations` + * 2018-04-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 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))) @@ -226,10 +278,13 @@ def operations(self): """Instance depends on the API version: * 2017-12-01: :class:`Operations` + * 2018-04-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 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))) @@ -278,6 +333,7 @@ def usage(self): * 2016-04-30-preview: :class:`UsageOperations` * 2017-03-30: :class:`UsageOperations` * 2017-12-01: :class:`UsageOperations` + * 2018-04-01: :class:`UsageOperations` """ api_version = self._get_api_version('usage') if api_version == '2015-06-15': @@ -290,6 +346,8 @@ def usage(self): 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 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))) @@ -303,6 +361,7 @@ def virtual_machine_extension_images(self): * 2016-04-30-preview: :class:`VirtualMachineExtensionImagesOperations` * 2017-03-30: :class:`VirtualMachineExtensionImagesOperations` * 2017-12-01: :class:`VirtualMachineExtensionImagesOperations` + * 2018-04-01: :class:`VirtualMachineExtensionImagesOperations` """ api_version = self._get_api_version('virtual_machine_extension_images') if api_version == '2015-06-15': @@ -315,6 +374,8 @@ def virtual_machine_extension_images(self): 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 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))) @@ -328,6 +389,7 @@ def virtual_machine_extensions(self): * 2016-04-30-preview: :class:`VirtualMachineExtensionsOperations` * 2017-03-30: :class:`VirtualMachineExtensionsOperations` * 2017-12-01: :class:`VirtualMachineExtensionsOperations` + * 2018-04-01: :class:`VirtualMachineExtensionsOperations` """ api_version = self._get_api_version('virtual_machine_extensions') if api_version == '2015-06-15': @@ -340,6 +402,8 @@ def virtual_machine_extensions(self): 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 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))) @@ -353,6 +417,7 @@ def virtual_machine_images(self): * 2016-04-30-preview: :class:`VirtualMachineImagesOperations` * 2017-03-30: :class:`VirtualMachineImagesOperations` * 2017-12-01: :class:`VirtualMachineImagesOperations` + * 2018-04-01: :class:`VirtualMachineImagesOperations` """ api_version = self._get_api_version('virtual_machine_images') if api_version == '2015-06-15': @@ -365,6 +430,8 @@ def virtual_machine_images(self): 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 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))) @@ -375,12 +442,15 @@ def virtual_machine_run_commands(self): * 2017-03-30: :class:`VirtualMachineRunCommandsOperations` * 2017-12-01: :class:`VirtualMachineRunCommandsOperations` + * 2018-04-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 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))) @@ -391,12 +461,15 @@ def virtual_machine_scale_set_extensions(self): * 2017-03-30: :class:`VirtualMachineScaleSetExtensionsOperations` * 2017-12-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2018-04-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 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))) @@ -407,12 +480,15 @@ def virtual_machine_scale_set_rolling_upgrades(self): * 2017-03-30: :class:`VirtualMachineScaleSetRollingUpgradesOperations` * 2017-12-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2018-04-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 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))) @@ -426,6 +502,7 @@ def virtual_machine_scale_set_vms(self): * 2016-04-30-preview: :class:`VirtualMachineScaleSetVMsOperations` * 2017-03-30: :class:`VirtualMachineScaleSetVMsOperations` * 2017-12-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetVMsOperations` """ api_version = self._get_api_version('virtual_machine_scale_set_vms') if api_version == '2015-06-15': @@ -438,6 +515,8 @@ def virtual_machine_scale_set_vms(self): 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 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))) @@ -451,6 +530,7 @@ def virtual_machine_scale_sets(self): * 2016-04-30-preview: :class:`VirtualMachineScaleSetsOperations` * 2017-03-30: :class:`VirtualMachineScaleSetsOperations` * 2017-12-01: :class:`VirtualMachineScaleSetsOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetsOperations` """ api_version = self._get_api_version('virtual_machine_scale_sets') if api_version == '2015-06-15': @@ -463,6 +543,8 @@ def virtual_machine_scale_sets(self): 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 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))) @@ -476,6 +558,7 @@ def virtual_machine_sizes(self): * 2016-04-30-preview: :class:`VirtualMachineSizesOperations` * 2017-03-30: :class:`VirtualMachineSizesOperations` * 2017-12-01: :class:`VirtualMachineSizesOperations` + * 2018-04-01: :class:`VirtualMachineSizesOperations` """ api_version = self._get_api_version('virtual_machine_sizes') if api_version == '2015-06-15': @@ -488,6 +571,8 @@ def virtual_machine_sizes(self): 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 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))) @@ -501,6 +586,7 @@ def virtual_machines(self): * 2016-04-30-preview: :class:`VirtualMachinesOperations` * 2017-03-30: :class:`VirtualMachinesOperations` * 2017-12-01: :class:`VirtualMachinesOperations` + * 2018-04-01: :class:`VirtualMachinesOperations` """ api_version = self._get_api_version('virtual_machines') if api_version == '2015-06-15': @@ -513,6 +599,8 @@ def virtual_machines(self): 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 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/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/compute_management_client.py index cfda081b1567..ffcfe0787b8c 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/compute_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -59,7 +59,7 @@ def __init__( self.subscription_id = subscription_id -class ComputeManagementClient(object): +class ComputeManagementClient(SDKClient): """Compute Client :ivar config: Configuration for client. @@ -98,7 +98,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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' diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_py3.py index 3df77ebfa38c..8442490c0e7a 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class AvailabilitySet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference_py3.py index f42ead50fc36..47da29278832 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class NetworkInterfaceReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_py3.py index da449b8e9154..f2aba4286bb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineCaptureResult(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image_py3.py index 217accab02f0..3d48c3a87fb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtensionImage(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.py index a3bbe0510df7..9aad21dc36fc 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtension(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update_py3.py index a5b8ea8c1104..c32c18d32759 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineExtensionUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_py3.py index fb55ba3fa039..61fa10d90a3c 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .virtual_machine_image_resource import VirtualMachineImageResource +from .virtual_machine_image_resource_py3 import VirtualMachineImageResource class VirtualMachineImage(VirtualMachineImageResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource_py3.py index 48a968bf2fbf..b9d63a8bc9e0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineImageResource(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py index 6691e50e4b9e..0097f5df2c7f 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachine(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py index 5523e0444c59..5c0ffe9af348 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetExtension(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration_py3.py index e075f019a729..91e163b09412 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetIPConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_py3.py index 77933661de7f..939cb61499ab 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetNetworkConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py index 7ef6ab297883..9d7545f85c01 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py index d69fd86bc0cf..5d83f88fe97d 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSetVM(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/compute_management_client.py index fd70594a902c..403c3f4449d9 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/compute_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -59,7 +59,7 @@ def __init__( self.subscription_id = subscription_id -class ComputeManagementClient(object): +class ComputeManagementClient(SDKClient): """Compute Client :ivar config: Configuration for client. @@ -98,7 +98,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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' diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_py3.py index 610f6ab71d8c..cde87ba77ccb 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class AvailabilitySet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference_py3.py index f42ead50fc36..47da29278832 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class NetworkInterfaceReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_py3.py index da449b8e9154..f2aba4286bb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineCaptureResult(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image_py3.py index 217accab02f0..3d48c3a87fb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtensionImage(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_py3.py index 32c448ecd2c2..ef8a5ef965ec 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtension(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update_py3.py index a5b8ea8c1104..c32c18d32759 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineExtensionUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_py3.py index efc8c3d8394e..4c8bd1482541 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .virtual_machine_image_resource import VirtualMachineImageResource +from .virtual_machine_image_resource_py3 import VirtualMachineImageResource class VirtualMachineImage(VirtualMachineImageResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource_py3.py index 48a968bf2fbf..b9d63a8bc9e0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineImageResource(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py index 4348f94e375d..1ec46e1a52e6 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachine(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py index 5523e0444c59..5c0ffe9af348 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetExtension(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py index 4e2c36c30e6c..f9b9d9b3a188 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetIPConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_py3.py index 1d82ed5e0c03..58f07fde6097 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetNetworkConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_py3.py index 5ca8108adb6e..fcca789186fa 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_py3.py index b5d22478c827..f759b6c80e4e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSetVM(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/compute_management_client.py index c58b204ba4d0..2c43eb9b0c1a 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/compute_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -62,7 +62,7 @@ def __init__( self.subscription_id = subscription_id -class ComputeManagementClient(object): +class ComputeManagementClient(SDKClient): """Compute Client :ivar config: Configuration for client. @@ -107,7 +107,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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' diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py index f9e977dbe70c..3b647797b6e2 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class AvailabilitySet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_py3.py index cf3b3dab5351..eba7a71b12db 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Disk(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update_py3.py index 545c2a218368..628867dc9093 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from .resource_update_py3 import ResourceUpdate class DiskUpdate(ResourceUpdate): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_py3.py index d035e3eb9106..87f57c1b86c3 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Image(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference_py3.py index f44047d4c087..1d7eefe5ac65 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class ImageReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters_py3.py index ffce009881d2..2be83953da18 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class ManagedDiskParameters(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference_py3.py index f42ead50fc36..47da29278832 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class NetworkInterfaceReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_py3.py index 325b6544e35e..0cbf1f525fdf 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Snapshot(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py index 22c491d39f6a..9832ce687fae 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from .resource_update_py3 import ResourceUpdate class SnapshotUpdate(ResourceUpdate): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_py3.py index da449b8e9154..f2aba4286bb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineCaptureResult(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image_py3.py index 217accab02f0..3d48c3a87fb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtensionImage(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_py3.py index 342cb444d9ce..b2ccf18662b8 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtension(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update_py3.py index a5b8ea8c1104..c32c18d32759 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineExtensionUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_py3.py index 04d6563b63b3..98fc935fa42d 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .virtual_machine_image_resource import VirtualMachineImageResource +from .virtual_machine_image_resource_py3 import VirtualMachineImageResource class VirtualMachineImage(VirtualMachineImageResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource_py3.py index 48a968bf2fbf..b9d63a8bc9e0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineImageResource(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py index c34a5e057c9a..d9fcdb6bbdd2 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachine(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py index 7d903d24994d..885120fef0d8 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource_read_only import SubResourceReadOnly +from .sub_resource_read_only_py3 import SubResourceReadOnly class VirtualMachineScaleSetExtension(SubResourceReadOnly): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration_py3.py index e3c09703cdf1..6b1f921db4d7 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetIPConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_py3.py index 10a0d88b296e..960adde3f070 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetNetworkConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_py3.py index f6125f581a42..a20bbbcba30a 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py index 79793f66dac7..f2a8ded088ed 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSetVM(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/compute_management_client.py index 1b2633721f7e..d671c7a363df 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/compute_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -66,7 +66,7 @@ def __init__( self.subscription_id = subscription_id -class ComputeManagementClient(object): +class ComputeManagementClient(SDKClient): """Compute Client :ivar config: Configuration for client. @@ -119,7 +119,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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' diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_py3.py index a096e28adcdc..b6bb617466f9 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class AvailabilitySet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py index 979613707c9f..8f76ec8c2165 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Disk(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_py3.py index ce585313920e..fc4d7781ba58 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from .resource_update_py3 import ResourceUpdate class DiskUpdate(ResourceUpdate): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_py3.py index 103ab400bb6a..92e3680ef6dd 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Image(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py index f44047d4c087..1d7eefe5ac65 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class ImageReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters_py3.py index d28adf8baf36..16d4a9339b5c 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class ManagedDiskParameters(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference_py3.py index f42ead50fc36..47da29278832 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class NetworkInterfaceReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info_py3.py index bae19f30c775..f287b4db2e5b 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class RollingUpgradeStatusInfo(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_py3.py index 8148374fdfd1..61ac7898e294 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .run_command_document_base import RunCommandDocumentBase +from .run_command_document_base_py3 import RunCommandDocumentBase class RunCommandDocument(RunCommandDocumentBase): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_py3.py index e33ea085e641..d73bc6086e0c 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .operation_status_response import OperationStatusResponse +from .operation_status_response_py3 import OperationStatusResponse class RunCommandResult(OperationStatusResponse): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.py index efa9b70bfefe..4538d2b84d83 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Snapshot(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_py3.py index 5890514da5aa..380ddaf2ef73 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from .resource_update_py3 import ResourceUpdate class SnapshotUpdate(ResourceUpdate): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_py3.py index da449b8e9154..f2aba4286bb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineCaptureResult(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image_py3.py index 217accab02f0..3d48c3a87fb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtensionImage(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_py3.py index 90ac643e6af3..4c3ca49d093b 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtension(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update_py3.py index a5b8ea8c1104..c32c18d32759 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineExtensionUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_py3.py index 91c71128968d..0140c64c7c4f 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .virtual_machine_image_resource import VirtualMachineImageResource +from .virtual_machine_image_resource_py3 import VirtualMachineImageResource class VirtualMachineImage(VirtualMachineImageResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource_py3.py index 48a968bf2fbf..b9d63a8bc9e0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineImageResource(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_py3.py index 791291568f1b..03753b4cf274 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachine(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_py3.py index 8c56cf6fe20d..27392a2de9fd 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource_read_only import SubResourceReadOnly +from .sub_resource_read_only_py3 import SubResourceReadOnly class VirtualMachineScaleSetExtension(SubResourceReadOnly): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py index f11b3584d844..70bf6a5ee613 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetIPConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py index 0f184fa10b2f..e44253a9a9b9 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetNetworkConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py index f1058061da23..a1ea651839eb 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration_py3.py index f7860d495575..c1f9f663572d 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_py3.py index 9ff9c77dc275..b688e9e2ca59 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_py3.py index c27c33be47de..e9471fed120a 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineScaleSetUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_py3.py index ee6d74113a2b..7a92604b6f19 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSetVM(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/compute_management_client.py index fd0c043a6b79..0dc37e4ed0a2 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/compute_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -51,7 +51,7 @@ def __init__( self.subscription_id = subscription_id -class ComputeManagementClient(object): +class ComputeManagementClient(SDKClient): """Compute Client :ivar config: Configuration for client. @@ -74,7 +74,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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' diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/compute_management_client.py index 3fcf22e996e6..fcd609539a4e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/compute_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -65,7 +65,7 @@ def __init__( self.subscription_id = subscription_id -class ComputeManagementClient(object): +class ComputeManagementClient(SDKClient): """Compute Client :ivar config: Configuration for client. @@ -116,7 +116,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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' diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py index 54fd6fca22fd..9f65b3c2c1e2 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py @@ -65,6 +65,7 @@ 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 @@ -106,11 +107,12 @@ 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 .upgrade_operation_history_status_py3 import UpgradeOperationHistoryStatus - 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 .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_scale_set_vm_py3 import VirtualMachineScaleSetVM @@ -191,6 +193,7 @@ 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 @@ -232,11 +235,12 @@ 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 .upgrade_operation_history_status import UpgradeOperationHistoryStatus - from .rolling_upgrade_progress_info import RollingUpgradeProgressInfo 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_scale_set_vm import VirtualMachineScaleSetVM @@ -356,6 +360,7 @@ 'VirtualMachineInstanceView', 'VirtualMachine', 'VirtualMachineUpdate', + 'AutoOSUpgradePolicy', 'RollingUpgradePolicy', 'UpgradePolicy', 'ImageOSDisk', @@ -397,11 +402,12 @@ 'VirtualMachineScaleSetInstanceView', 'VirtualMachineScaleSetSkuCapacity', 'VirtualMachineScaleSetSku', - 'UpgradeOperationHistoryStatus', - 'RollingUpgradeProgressInfo', 'ApiErrorBase', 'InnerError', 'ApiError', + 'RollbackStatusInfo', + 'UpgradeOperationHistoryStatus', + 'RollingUpgradeProgressInfo', 'UpgradeOperationHistoricalStatusInfoProperties', 'UpgradeOperationHistoricalStatusInfo', 'VirtualMachineScaleSetVM', diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy.py new file mode 100644 index 000000000000..2c74af408892 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy_py3.py new file mode 100644 index 000000000000..3e3e751838a8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/auto_os_upgrade_policy_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_py3.py index 0c9c9d33e2a9..0c47c63718b3 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class AvailabilitySet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update_py3.py index cc3cbdfe39ff..0feeb62c51dc 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/availability_set_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class AvailabilitySetUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_py3.py index 382edb4e40bd..65e29e15d43f 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Image(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference_py3.py index f44047d4c087..1d7eefe5ac65 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class ImageReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update_py3.py index ce8ddec32170..a1d5db473166 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/image_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class ImageUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result_py3.py index f03b2b57cc75..bab57ba54ad9 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/log_analytics_operation_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .operation_status_response import OperationStatusResponse +from .operation_status_response_py3 import OperationStatusResponse class LogAnalyticsOperationResult(OperationStatusResponse): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters_py3.py index cd11679f5f8d..8941c0baa651 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/managed_disk_parameters_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class ManagedDiskParameters(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference_py3.py index f42ead50fc36..47da29278832 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/network_interface_reference_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class NetworkInterfaceReference(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input_py3.py index 5e931a0379aa..c59fafd6859b 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/request_rate_by_interval_input_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .log_analytics_input_base import LogAnalyticsInputBase +from .log_analytics_input_base_py3 import LogAnalyticsInputBase class RequestRateByIntervalInput(LogAnalyticsInputBase): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info.py new file mode 100644 index 000000000000..5f4ef5e06784 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info_py3.py new file mode 100644 index 000000000000..c3bab57af6c9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rollback_status_info_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info_py3.py index a2fd0b7b6c02..7f5e4ba43de5 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/rolling_upgrade_status_info_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class RollingUpgradeStatusInfo(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py index 6dc3cd6c8a01..cb2631691b22 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .run_command_document_base import RunCommandDocumentBase +from .run_command_document_base_py3 import RunCommandDocumentBase class RunCommandDocument(RunCommandDocumentBase): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result_py3.py index 2e2cf9f33125..4868e9fd3159 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .operation_status_response import OperationStatusResponse +from .operation_status_response_py3 import OperationStatusResponse class RunCommandResult(OperationStatusResponse): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input_py3.py index 31ed921240e2..025900705375 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/throttled_requests_input_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .log_analytics_input_base import LogAnalyticsInputBase +from .log_analytics_input_base_py3 import LogAnalyticsInputBase class ThrottledRequestsInput(LogAnalyticsInputBase): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties.py index 3c5d883f1b9c..a0c1af8046e9 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties.py @@ -34,6 +34,9 @@ class UpgradeOperationHistoricalStatusInfoProperties(Model): :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 = { @@ -42,6 +45,7 @@ class UpgradeOperationHistoricalStatusInfoProperties(Model): 'error': {'readonly': True}, 'started_by': {'readonly': True}, 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, } _attribute_map = { @@ -50,6 +54,7 @@ class UpgradeOperationHistoricalStatusInfoProperties(Model): '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): @@ -59,3 +64,4 @@ def __init__(self, **kwargs): self.error = None self.started_by = None self.target_image_reference = None + self.rollback_info = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties_py3.py index beadceadf33a..d623b4968ad4 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_operation_historical_status_info_properties_py3.py @@ -34,6 +34,9 @@ class UpgradeOperationHistoricalStatusInfoProperties(Model): :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 = { @@ -42,6 +45,7 @@ class UpgradeOperationHistoricalStatusInfoProperties(Model): 'error': {'readonly': True}, 'started_by': {'readonly': True}, 'target_image_reference': {'readonly': True}, + 'rollback_info': {'readonly': True}, } _attribute_map = { @@ -50,6 +54,7 @@ class UpgradeOperationHistoricalStatusInfoProperties(Model): '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: @@ -59,3 +64,4 @@ def __init__(self, **kwargs) -> None: self.error = None self.started_by = None self.target_image_reference = None + self.rollback_info = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py index 209ab85eda51..1f73bc7f23b5 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py @@ -30,12 +30,17 @@ class UpgradePolicy(Model): 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): @@ -43,3 +48,4 @@ def __init__(self, **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/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py index 3441201b6197..7c0b91a3180d 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py @@ -30,16 +30,22 @@ class UpgradePolicy(Model): 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, **kwargs) -> None: + 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/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result_py3.py index da449b8e9154..f2aba4286bb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_capture_result_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineCaptureResult(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image_py3.py index 217accab02f0..3d48c3a87fb0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtensionImage(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_py3.py index ae11b2009578..7800d917ccfc 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineExtension(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update_py3.py index a5b8ea8c1104..c32c18d32759 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_extension_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineExtensionUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_py3.py index d1172470ece7..7c05b2469d1e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .virtual_machine_image_resource import VirtualMachineImageResource +from .virtual_machine_image_resource_py3 import VirtualMachineImageResource class VirtualMachineImage(VirtualMachineImageResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource_py3.py index 48a968bf2fbf..b9d63a8bc9e0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_image_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineImageResource(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_py3.py index cfae95db0776..53a7270afebc 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachine(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_py3.py index 8c56cf6fe20d..27392a2de9fd 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_extension_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource_read_only import SubResourceReadOnly +from .sub_resource_read_only_py3 import SubResourceReadOnly class VirtualMachineScaleSetExtension(SubResourceReadOnly): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration_py3.py index f1a96384fd52..060b37a14daa 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_ip_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetIPConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_py3.py index 78d8564906c3..995a1db4437e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_network_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetNetworkConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_py3.py index 6894911e1e4b..bf8d6f68d357 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSet(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py index 73d1bef780ad..508b342da128 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetUpdateIPConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration_py3.py index 9d4109287ec2..cccdbeb9c314 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_network_configuration_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .sub_resource import SubResource +from .sub_resource_py3 import SubResource class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_py3.py index a4654e1b277c..cbcb433d0173 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineScaleSetUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_py3.py index 1f8c9ce7d927..24d0acda8dcb 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_scale_set_vm_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class VirtualMachineScaleSetVM(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update_py3.py index 7dbab0a47e9f..33abe81fdb0b 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/virtual_machine_update_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .update_resource import UpdateResource +from .update_resource_py3 import UpdateResource class VirtualMachineUpdate(UpdateResource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py index 382bad2d0135..63b1db3da61a 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py @@ -9,10 +9,25 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +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_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_machines_operations import VirtualMachinesOperations +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 @@ -52,12 +67,42 @@ def __init__( self.subscription_id = subscription_id -class ComputeManagementClient(object): +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 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_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_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.compute.v2018_04_01.operations.VirtualMachinesOperations + :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 @@ -77,13 +122,43 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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.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.images = ImagesOperations( + 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_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( diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py index e9b76b3dc97d..0dddc66aae88 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py @@ -10,9 +10,133 @@ # -------------------------------------------------------------------------- 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_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_scale_set_vm_py3 import VirtualMachineScaleSetVM + from .virtual_machine_health_status_py3 import VirtualMachineHealthStatus + from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView + 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 .resource_update_py3 import ResourceUpdate from .image_disk_reference_py3 import ImageDiskReference from .creation_data_py3 import CreationData from .source_vault_py3 import SourceVault @@ -26,14 +150,134 @@ from .access_uri_py3 import AccessUri from .snapshot_py3 import Snapshot from .snapshot_update_py3 import SnapshotUpdate - from .api_error_base_py3 import ApiErrorBase - from .inner_error_py3 import InnerError - from .api_error_py3 import ApiError - from .operation_status_response_py3 import OperationStatusResponse 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_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_scale_set_vm import VirtualMachineScaleSetVM + from .virtual_machine_health_status import VirtualMachineHealthStatus + from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView + 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 .resource_update import ResourceUpdate from .image_disk_reference import ImageDiskReference from .creation_data import CreationData from .source_vault import SourceVault @@ -47,24 +291,178 @@ from .access_uri import AccessUri from .snapshot import Snapshot from .snapshot_update import SnapshotUpdate - from .api_error_base import ApiErrorBase - from .inner_error import InnerError - from .api_error import ApiError - from .operation_status_response import OperationStatusResponse +from .compute_operation_value_paged import ComputeOperationValuePaged +from .availability_set_paged import AvailabilitySetPaged +from .virtual_machine_size_paged import VirtualMachineSizePaged +from .usage_paged import UsagePaged +from .image_paged import ImagePaged +from .virtual_machine_paged import VirtualMachinePaged +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 ( - StorageAccountTypes, + StatusLevelTypes, OperatingSystemTypes, + VirtualMachineSizeTypes, + CachingTypes, + DiskCreateOptionTypes, + StorageAccountTypes, + PassNames, + ComponentNames, + SettingNames, + ProtocolTypes, + ResourceIdentityType, + MaintenanceOperationResultCodeTypes, + UpgradeMode, + OperatingSystemStateTypes, + IPVersion, + VirtualMachinePriorityTypes, + VirtualMachineEvictionPolicyTypes, + VirtualMachineScaleSetSkuScaleType, + UpgradeState, + UpgradeOperationInvoker, + RollingUpgradeStatusCode, + RollingUpgradeActionType, + IntervalInMins, DiskCreateOption, SnapshotStorageAccountTypes, AccessLevel, + InstanceViewTypes, ) __all__ = [ + 'ComputeOperationValue', + 'InstanceViewStatus', + 'SubResource', + 'Sku', + 'AvailabilitySet', + 'AvailabilitySetUpdate', + 'VirtualMachineSize', + 'VirtualMachineExtensionImage', + 'VirtualMachineImageResource', + 'VirtualMachineExtensionInstanceView', + 'VirtualMachineExtension', + 'VirtualMachineExtensionUpdate', + 'VirtualMachineExtensionsListResult', + 'PurchasePlan', + 'OSDiskImage', + 'DataDiskImage', + 'VirtualMachineImage', + 'UsageName', + 'Usage', + 'VirtualMachineCaptureParameters', + 'VirtualMachineCaptureResult', + 'Plan', + 'HardwareProfile', + 'ImageReference', + 'KeyVaultSecretReference', + 'KeyVaultKeyReference', + 'DiskEncryptionSettings', + 'VirtualHardDisk', + 'ManagedDiskParameters', + 'OSDisk', + 'DataDisk', + 'StorageProfile', + 'AdditionalUnattendContent', + 'WinRMListener', + 'WinRMConfiguration', + 'WindowsConfiguration', + 'SshPublicKey', + 'SshConfiguration', + 'LinuxConfiguration', + 'VaultCertificate', + 'VaultSecretGroup', + 'OSProfile', + 'NetworkInterfaceReference', + 'NetworkProfile', + 'BootDiagnostics', + 'DiagnosticsProfile', + 'VirtualMachineExtensionHandlerInstanceView', + 'VirtualMachineAgentInstanceView', + 'DiskInstanceView', + 'BootDiagnosticsInstanceView', + 'VirtualMachineIdentity', + 'MaintenanceRedeployStatus', + 'VirtualMachineInstanceView', + 'VirtualMachine', + 'VirtualMachineUpdate', + 'AutoOSUpgradePolicy', + 'RollingUpgradePolicy', + 'UpgradePolicy', + 'ImageOSDisk', + 'ImageDataDisk', + 'ImageStorageProfile', + 'Image', + 'ImageUpdate', + 'VirtualMachineScaleSetIdentity', + 'VirtualMachineScaleSetOSProfile', + 'VirtualMachineScaleSetUpdateOSProfile', + 'VirtualMachineScaleSetManagedDiskParameters', + 'VirtualMachineScaleSetOSDisk', + 'VirtualMachineScaleSetUpdateOSDisk', + 'VirtualMachineScaleSetDataDisk', + 'VirtualMachineScaleSetStorageProfile', + 'VirtualMachineScaleSetUpdateStorageProfile', + 'ApiEntityReference', + 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings', + 'VirtualMachineScaleSetIpTag', + 'VirtualMachineScaleSetPublicIPAddressConfiguration', + 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration', + 'VirtualMachineScaleSetIPConfiguration', + 'VirtualMachineScaleSetUpdateIPConfiguration', + 'VirtualMachineScaleSetNetworkConfigurationDnsSettings', + 'VirtualMachineScaleSetNetworkConfiguration', + 'VirtualMachineScaleSetUpdateNetworkConfiguration', + 'VirtualMachineScaleSetNetworkProfile', + 'VirtualMachineScaleSetUpdateNetworkProfile', + 'VirtualMachineScaleSetExtension', + 'VirtualMachineScaleSetExtensionProfile', + 'VirtualMachineScaleSetVMProfile', + 'VirtualMachineScaleSetUpdateVMProfile', + 'VirtualMachineScaleSet', + 'VirtualMachineScaleSetUpdate', + 'VirtualMachineScaleSetVMInstanceIDs', + 'VirtualMachineScaleSetVMInstanceRequiredIDs', + 'VirtualMachineStatusCodeCount', + 'VirtualMachineScaleSetInstanceViewStatusesSummary', + 'VirtualMachineScaleSetVMExtensionsSummary', + 'VirtualMachineScaleSetInstanceView', + 'VirtualMachineScaleSetSkuCapacity', + 'VirtualMachineScaleSetSku', + 'ApiErrorBase', + 'InnerError', + 'ApiError', + 'RollbackStatusInfo', + 'UpgradeOperationHistoryStatus', + 'RollingUpgradeProgressInfo', + 'UpgradeOperationHistoricalStatusInfoProperties', + 'UpgradeOperationHistoricalStatusInfo', + 'VirtualMachineScaleSetVM', + 'VirtualMachineHealthStatus', + 'VirtualMachineScaleSetVMInstanceView', + 'RollingUpgradeRunningStatus', + 'RollingUpgradeStatusInfo', 'Resource', + 'UpdateResource', + 'SubResourceReadOnly', + 'RecoveryWalkResponse', + 'RequestRateByIntervalInput', + 'ThrottledRequestsInput', + 'LogAnalyticsInputBase', + 'LogAnalyticsOutput', + 'LogAnalyticsOperationResult', + 'RunCommandInputParameter', + 'RunCommandInput', + 'RunCommandParameterDefinition', + 'RunCommandDocumentBase', + 'RunCommandDocument', + 'RunCommandResult', 'DiskSku', - 'ResourceUpdate', 'ImageDiskReference', 'CreationData', 'SourceVault', @@ -78,15 +476,45 @@ 'AccessUri', 'Snapshot', 'SnapshotUpdate', - 'ApiErrorBase', - 'InnerError', - 'ApiError', - 'OperationStatusResponse', + 'ComputeOperationValuePaged', + 'AvailabilitySetPaged', + 'VirtualMachineSizePaged', + 'UsagePaged', + 'ImagePaged', + 'VirtualMachinePaged', + 'VirtualMachineScaleSetPaged', + 'VirtualMachineScaleSetSkuPaged', + 'UpgradeOperationHistoricalStatusInfoPaged', + 'VirtualMachineScaleSetExtensionPaged', + 'VirtualMachineScaleSetVMPaged', + 'RunCommandDocumentBasePaged', 'DiskPaged', 'SnapshotPaged', - 'StorageAccountTypes', + 'StatusLevelTypes', 'OperatingSystemTypes', + 'VirtualMachineSizeTypes', + 'CachingTypes', + 'DiskCreateOptionTypes', + 'StorageAccountTypes', + 'PassNames', + 'ComponentNames', + 'SettingNames', + 'ProtocolTypes', + 'ResourceIdentityType', + 'MaintenanceOperationResultCodeTypes', + 'UpgradeMode', + 'OperatingSystemStateTypes', + 'IPVersion', + 'VirtualMachinePriorityTypes', + 'VirtualMachineEvictionPolicyTypes', + 'VirtualMachineScaleSetSkuScaleType', + 'UpgradeState', + 'UpgradeOperationInvoker', + 'RollingUpgradeStatusCode', + 'RollingUpgradeActionType', + 'IntervalInMins', 'DiskCreateOption', 'SnapshotStorageAccountTypes', 'AccessLevel', + 'InstanceViewTypes', ] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py index 9ee6b01de1e1..fec7ad1244ab 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py @@ -27,7 +27,7 @@ class AccessUri(Model): } _attribute_map = { - 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py index bb9e56aa4221..c13208a20d8d 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py @@ -27,7 +27,7 @@ class AccessUri(Model): } _attribute_map = { - 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, } def __init__(self, **kwargs) -> None: diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content.py new file mode 100644 index 000000000000..c8262b8dc95f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content_py3.py new file mode 100644 index 000000000000..17c0266fe4b0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/additional_unattend_content_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference.py new file mode 100644 index 000000000000..d1bf572e916d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/{SubcriptionId}/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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference_py3.py new file mode 100644 index 000000000000..da3e07082381 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_entity_reference_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/{SubcriptionId}/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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy.py new file mode 100644 index 000000000000..2c74af408892 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy_py3.py new file mode 100644 index 000000000000..3e3e751838a8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/auto_os_upgrade_policy_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set.py new file mode 100644 index 000000000000..9221a6ce1278 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 maintainance, 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] + :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]'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_paged.py new file mode 100644 index 000000000000..d3f242bb4d7d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_py3.py new file mode 100644 index 000000000000..65c743257697 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 maintainance, 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] + :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]'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update.py new file mode 100644 index 000000000000..749c2d03a3e1 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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] + :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]'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update_py3.py new file mode 100644 index 000000000000..099479e29c04 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/availability_set_update_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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] + :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]'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics.py new file mode 100644 index 000000000000..ca3dbdd4f23c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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.

For Linux Virtual + Machines, you can easily view the output of your console log.

For + both Windows and Linux virtual machines, 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view.py new file mode 100644 index 000000000000..6fe1f84a3910 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. + + :param console_screenshot_blob_uri: The console screenshot blob URI. + :type console_screenshot_blob_uri: str + :param serial_console_log_blob_uri: The Linux serial console log blob Uri. + :type serial_console_log_blob_uri: str + """ + + _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 = kwargs.get('console_screenshot_blob_uri', None) + self.serial_console_log_blob_uri = kwargs.get('serial_console_log_blob_uri', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view_py3.py new file mode 100644 index 000000000000..d85b51981ab9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_instance_view_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. + + :param console_screenshot_blob_uri: The console screenshot blob URI. + :type console_screenshot_blob_uri: str + :param serial_console_log_blob_uri: The Linux serial console log blob Uri. + :type serial_console_log_blob_uri: str + """ + + _attribute_map = { + 'console_screenshot_blob_uri': {'key': 'consoleScreenshotBlobUri', 'type': 'str'}, + 'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'}, + } + + def __init__(self, *, console_screenshot_blob_uri: str=None, serial_console_log_blob_uri: str=None, **kwargs) -> None: + super(BootDiagnosticsInstanceView, self).__init__(**kwargs) + self.console_screenshot_blob_uri = console_screenshot_blob_uri + self.serial_console_log_blob_uri = serial_console_log_blob_uri diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_py3.py new file mode 100644 index 000000000000..b0a756ea4fa0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/boot_diagnostics_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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.

For Linux Virtual + Machines, you can easily view the output of your console log.

For + both Windows and Linux virtual machines, 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py index 94796a92c793..b66be29c4cf4 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py @@ -12,10 +12,11 @@ from enum import Enum -class StorageAccountTypes(str, Enum): +class StatusLevelTypes(str, Enum): - standard_lrs = "Standard_LRS" - premium_lrs = "Premium_LRS" + info = "Info" + warning = "Warning" + error = "Error" class OperatingSystemTypes(str, Enum): @@ -24,6 +25,308 @@ class OperatingSystemTypes(str, Enum): 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" + + +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 DiskCreateOption(str, Enum): empty = "Empty" @@ -45,3 +348,8 @@ class AccessLevel(str, Enum): none = "None" read = "Read" + + +class InstanceViewTypes(str, Enum): + + instance_view = "instanceView" diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value.py new file mode 100644 index 000000000000..525ef3bbb69a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_paged.py new file mode 100644 index 000000000000..0735c0107487 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_py3.py new file mode 100644 index 000000000000..3c4388f312b9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_operation_value_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk.py new file mode 100644 index 000000000000..b72af03bf155 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 name 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image.py new file mode 100644 index 000000000000..b5dbfcefb472 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image_py3.py new file mode 100644 index 000000000000..8431a3988502 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_image_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_py3.py new file mode 100644 index 000000000000..9a75b455ed11 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/data_disk_py3.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 name 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile.py new file mode 100644 index 000000000000..c809544d655e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

For Linux Virtual Machines, you can easily view the output of + your console log.

For both Windows and Linux virtual machines, + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile_py3.py new file mode 100644 index 000000000000..0193402fe61f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/diagnostics_profile_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

For Linux Virtual Machines, you can easily view the output of + your console log.

For both Windows and Linux virtual machines, + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings.py new file mode 100644 index 000000000000..7fd550357d75 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings_py3.py new file mode 100644 index 000000000000..380a0b7f1176 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_encryption_settings_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view.py new file mode 100644 index 000000000000..9a040fd5739b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view_py3.py new file mode 100644 index 000000000000..b9583371ba8b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_instance_view_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_py3.py index 34dd0febdc77..8fa2d4b9828d 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Disk(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update.py index 7364769892bf..3ca75fec3871 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update.py @@ -9,16 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from msrest.serialization import Model -class DiskUpdate(ResourceUpdate): +class DiskUpdate(Model): """Disk update resource. - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku :param os_type: the Operating System type. Possible values include: 'Windows', 'Linux' :type os_type: str or @@ -32,14 +28,18 @@ class DiskUpdate(ResourceUpdate): :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 = { - '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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, } def __init__(self, **kwargs): @@ -47,3 +47,5 @@ def __init__(self, **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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update_py3.py index 0764da0e7f0c..407d553cff9e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_update_py3.py @@ -9,16 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from msrest.serialization import Model -class DiskUpdate(ResourceUpdate): +class DiskUpdate(Model): """Disk update resource. - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku :param os_type: the Operating System type. Possible values include: 'Windows', 'Linux' :type os_type: str or @@ -32,18 +28,24 @@ class DiskUpdate(ResourceUpdate): :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 = { - '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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, } - 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) + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile.py new file mode 100644 index 000000000000..c9f1db70f257 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile_py3.py new file mode 100644 index 000000000000..a9f8ba14df0e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/hardware_profile_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image.py new file mode 100644 index 000000000000..d3a1f84f255c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py new file mode 100644 index 000000000000..ae905adba8c4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py new file mode 100644 index 000000000000..7112f92f78c0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py new file mode 100644 index 000000000000..3ef3a0cd4414 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py new file mode 100644 index 000000000000..59c61abd3f0f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_paged.py new file mode 100644 index 000000000000..de04f8efc49c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_py3.py new file mode 100644 index 000000000000..916f2df5e511 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference.py new file mode 100644 index 000000000000..b8f929f4ad70 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference_py3.py new file mode 100644 index 000000000000..1d7eefe5ac65 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_reference_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile.py new file mode 100644 index 000000000000..2cd188cf28f9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile_py3.py new file mode 100644 index 000000000000..359c87789cc3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_storage_profile_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update.py new file mode 100644 index 000000000000..56f1f29d62d6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update.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 .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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update_py3.py new file mode 100644 index 000000000000..47658e7217f1 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_update_py3.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 .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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status.py new file mode 100644 index 000000000000..fb7e1d99269e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status_py3.py new file mode 100644 index 000000000000..b3cf969f8cae --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/instance_view_status_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference.py new file mode 100644 index 000000000000..f1eb6d6c120a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference_py3.py new file mode 100644 index 000000000000..378de235d684 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_key_reference_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference.py new file mode 100644 index 000000000000..082199bce901 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference_py3.py new file mode 100644 index 000000000000..8d938cbf5e89 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/key_vault_secret_reference_py3.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration.py new file mode 100644 index 000000000000..3dc5246c35d7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration_py3.py new file mode 100644 index 000000000000..45614597db33 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/linux_configuration_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base.py new file mode 100644 index 000000000000..843b739a0328 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base_py3.py new file mode 100644 index 000000000000..b9420117a8ca --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_input_base_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result.py new file mode 100644 index 000000000000..ebb7a1177049 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result_py3.py new file mode 100644 index 000000000000..dfeceeb58cf4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_operation_result_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output.py new file mode 100644 index 000000000000..5ea1615011c3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output_py3.py new file mode 100644 index 000000000000..71a428a8e49a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/log_analytics_output_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status.py new file mode 100644 index 000000000000..6c22c904d185 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status_py3.py new file mode 100644 index 000000000000..f2e8bbf807df --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/maintenance_redeploy_status_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py new file mode 100644 index 000000000000..a16aed3bbcbf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py new file mode 100644 index 000000000000..50b8a76181d6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference.py new file mode 100644 index 000000000000..b86e305e3f74 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference_py3.py new file mode 100644 index 000000000000..47da29278832 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_interface_reference_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile.py new file mode 100644 index 000000000000..b547518c8397 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile_py3.py new file mode 100644 index 000000000000..63e37d139e29 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/network_profile_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk.py new file mode 100644 index 000000000000..e82f77c2447c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 name 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image.py new file mode 100644 index 000000000000..ad439c7ab470 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image_py3.py new file mode 100644 index 000000000000..1d9c6e45d677 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_image_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_py3.py new file mode 100644 index 000000000000..e45324c5df9c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_disk_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 name 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile.py new file mode 100644 index 000000000000..3197bdb4b81f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

**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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile_py3.py new file mode 100644 index 000000000000..eaef9a9ff6a0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/os_profile_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

    **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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan.py new file mode 100644 index 000000000000..d42b6b32cfac --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan_py3.py new file mode 100644 index 000000000000..9cca2c78a123 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/plan_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan.py new file mode 100644 index 000000000000..2e1509addca6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan_py3.py new file mode 100644 index 000000000000..26f7996f1633 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/purchase_plan_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response.py new file mode 100644 index 000000000000..8dcbca604c7e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response_py3.py new file mode 100644 index 000000000000..5b24a0ed9b7a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/recovery_walk_response_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py new file mode 100644 index 000000000000..8712882e54db --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input_py3.py new file mode 100644 index 000000000000..c073513f5d59 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info.py new file mode 100644 index 000000000000..ebc35953f076 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info_py3.py new file mode 100644 index 000000000000..478f15ca323b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rollback_status_info_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy.py new file mode 100644 index 000000000000..1eecaa5e2e65 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy_py3.py new file mode 100644 index 000000000000..e698a382f112 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_policy_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info.py new file mode 100644 index 000000000000..87e40590e275 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info_py3.py new file mode 100644 index 000000000000..060abc3063b4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_progress_info_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status.py new file mode 100644 index 000000000000..0fc6dadaaac9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status_py3.py new file mode 100644 index 000000000000..013502d02229 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_running_status_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info.py new file mode 100644 index 000000000000..eb679db28958 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info_py3.py new file mode 100644 index 000000000000..8baa5b20df04 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/rolling_upgrade_status_info_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document.py new file mode 100644 index 000000000000..fb511a45281d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base.py new file mode 100644 index 000000000000..2ae3371b83e7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_paged.py new file mode 100644 index 000000000000..1ac583338364 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_py3.py new file mode 100644 index 000000000000..45919bf4d325 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_base_py3.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_py3.py new file mode 100644 index 000000000000..3543a6d45ef5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_document_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input.py new file mode 100644 index 000000000000..25b53a1f0336 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter.py new file mode 100644 index 000000000000..cd76ad81bfa2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter_py3.py new file mode 100644 index 000000000000..6013f038a1c3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_parameter_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_py3.py new file mode 100644 index 000000000000..ae2a3588c64d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_input_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition.py new file mode 100644 index 000000000000..e09f774d8241 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition_py3.py new file mode 100644 index 000000000000..e5fbc708f965 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_parameter_definition_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result.py new file mode 100644 index 000000000000..8fafc31dd548 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """Run command operation response. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RunCommandResult, self).__init__(**kwargs) + self.output = kwargs.get('output', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result_py3.py new file mode 100644 index 000000000000..852c2895dcee --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/run_command_result_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """Run command operation response. + + :param output: Operation output data (raw JSON) + :type output: object + """ + + _attribute_map = { + 'output': {'key': 'properties.output', 'type': 'object'}, + } + + def __init__(self, *, output=None, **kwargs) -> None: + super(RunCommandResult, self).__init__(**kwargs) + self.output = output diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku.py new file mode 100644 index 000000000000..5c07709435e0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku_py3.py new file mode 100644 index 000000000000..f6bc74afaadc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sku_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_py3.py index ac1163f8980f..d44887e1c702 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Snapshot(Resource): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update.py index 6483ca6dd981..119c6f05bc49 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update.py @@ -9,16 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from msrest.serialization import Model -class SnapshotUpdate(ResourceUpdate): +class SnapshotUpdate(Model): """Snapshot update resource. - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku :param os_type: the Operating System type. Possible values include: 'Windows', 'Linux' :type os_type: str or @@ -32,14 +28,18 @@ class SnapshotUpdate(ResourceUpdate): :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 = { - '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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, } def __init__(self, **kwargs): @@ -47,3 +47,5 @@ def __init__(self, **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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update_py3.py index f4d48cddbd67..54e05426ce8e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/snapshot_update_py3.py @@ -9,16 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_update import ResourceUpdate +from msrest.serialization import Model -class SnapshotUpdate(ResourceUpdate): +class SnapshotUpdate(Model): """Snapshot update resource. - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku :param os_type: the Operating System type. Possible values include: 'Windows', 'Linux' :type os_type: str or @@ -32,18 +28,24 @@ class SnapshotUpdate(ResourceUpdate): :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 = { - '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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, } - 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) + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration.py new file mode 100644 index 000000000000..ff92fd1a9376 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration_py3.py new file mode 100644 index 000000000000..e81ca2f47af3 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_configuration_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key.py new file mode 100644 index 000000000000..122e0d3b9fdd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key_py3.py new file mode 100644 index 000000000000..b16ee085b36b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/ssh_public_key_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile.py new file mode 100644 index 000000000000..da1fef243048 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile_py3.py new file mode 100644 index 000000000000..62cb9eb9b38e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/storage_profile_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource.py new file mode 100644 index 000000000000..11e092cc6ff5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_py3.py new file mode 100644 index 000000000000..29e5afee38f9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only.py new file mode 100644 index 000000000000..4a0ec466c0d4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only_py3.py new file mode 100644 index 000000000000..cb918e9a2ac6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/sub_resource_read_only_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input.py new file mode 100644 index 000000000000..5eac2a5540ac --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input_py3.py new file mode 100644 index 000000000000..025900705375 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/throttled_requests_input_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource.py similarity index 71% rename from azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_update.py rename to azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource.py index 1ab6fb273f49..b1d2898ff082 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_update.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource.py @@ -12,21 +12,17 @@ from msrest.serialization import Model -class ResourceUpdate(Model): - """The Resource model definition. +class UpdateResource(Model): + """The Update Resource model definition. :param tags: Resource tags :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.models.DiskSku """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'DiskSku'}, } def __init__(self, **kwargs): - super(ResourceUpdate, self).__init__(**kwargs) + super(UpdateResource, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource_py3.py similarity index 67% rename from azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_update_py3.py rename to azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource_py3.py index 1074982f9341..c06c17c124d9 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/resource_update_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/update_resource_py3.py @@ -12,21 +12,17 @@ from msrest.serialization import Model -class ResourceUpdate(Model): - """The Resource model definition. +class UpdateResource(Model): + """The Update Resource model definition. :param tags: Resource tags :type tags: dict[str, str] - :param sku: - :type sku: ~azure.mgmt.compute.v2018_04_01.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) + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) self.tags = tags - self.sku = sku diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info.py new file mode 100644 index 000000000000..d243b61b2e80 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_paged.py new file mode 100644 index 000000000000..b7296a3dedb1 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties.py new file mode 100644 index 000000000000..45437a8f2f76 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 VM's 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties_py3.py new file mode 100644 index 000000000000..b06dcb8a034a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_properties_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 VM's 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_py3.py new file mode 100644 index 000000000000..9e967e04a07d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_historical_status_info_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/operation_status_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status.py similarity index 57% rename from azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/operation_status_response.py rename to azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status.py index 3fc201f5913a..e0d6390aeeb5 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/operation_status_response.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status.py @@ -12,44 +12,35 @@ from msrest.serialization import Model -class OperationStatusResponse(Model): - """Operation status response. +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 name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation + :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 operation + :ivar end_time: End time of the upgrade. :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError """ _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, + 'code': {'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'}, + 'code': {'key': 'code', 'type': 'UpgradeState'}, '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 + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None self.start_time = None self.end_time = None - self.error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/operation_status_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status_py3.py similarity index 57% rename from azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/operation_status_response_py3.py rename to azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status_py3.py index 914868a01954..a7e9eaa62a69 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/operation_status_response_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_operation_history_status_py3.py @@ -12,44 +12,35 @@ from msrest.serialization import Model -class OperationStatusResponse(Model): - """Operation status response. +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 name: Operation ID - :vartype name: str - :ivar status: Operation status - :vartype status: str - :ivar start_time: Start time of the operation + :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 operation + :ivar end_time: End time of the upgrade. :vartype end_time: datetime - :ivar error: Api error - :vartype error: ~azure.mgmt.compute.v2018_04_01.models.ApiError """ _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, + 'code': {'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'}, + 'code': {'key': 'code', 'type': 'UpgradeState'}, '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 + super(UpgradeOperationHistoryStatus, self).__init__(**kwargs) + self.code = None self.start_time = None self.end_time = None - self.error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy.py new file mode 100644 index 000000000000..4335909afd81 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy_py3.py new file mode 100644 index 000000000000..526357dfaf1c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/upgrade_policy_py3.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage.py new file mode 100644 index 000000000000..eae36ebf0dc2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name.py new file mode 100644 index 000000000000..e2560936493e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name_py3.py new file mode 100644 index 000000000000..ad0b77459f75 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_name_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_paged.py new file mode 100644 index 000000000000..d3533ab09848 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_py3.py new file mode 100644 index 000000000000..7a2ae5cbd250 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/usage_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate.py new file mode 100644 index 000000000000..b173def6f820 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate_py3.py new file mode 100644 index 000000000000..eda5ba1c3f1d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_certificate_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group.py new file mode 100644 index 000000000000..182f200952fc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group_py3.py new file mode 100644 index 000000000000..c92697778df0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/vault_secret_group_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk.py new file mode 100644 index 000000000000..5e3ad9dea7d4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk_py3.py new file mode 100644 index 000000000000..9c069b95f084 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_hard_disk_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine.py new file mode 100644 index 000000000000..2a6eb930517d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine.py @@ -0,0 +1,150 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 maintainance, 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 + :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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view.py new file mode 100644 index 000000000000..a2ad4c4f8bc8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view_py3.py new file mode 100644 index 000000000000..dce8f0d40cc8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_agent_instance_view_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters.py new file mode 100644 index 000000000000..4e6ffbea7a4f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters_py3.py new file mode 100644 index 000000000000..1866cdc23300 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_parameters_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result.py new file mode 100644 index 000000000000..2972e1f2fcda --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result_py3.py new file mode 100644 index 000000000000..09e8afde1591 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_capture_result_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension.py new file mode 100644 index 000000000000..02db951458f4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view.py new file mode 100644 index 000000000000..2d7ec6ac6782 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view_py3.py new file mode 100644 index 000000000000..ba82a5e876e4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_handler_instance_view_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image.py new file mode 100644 index 000000000000..7273e2b84754 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image_py3.py new file mode 100644 index 000000000000..3d48c3a87fb0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_image_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view.py new file mode 100644 index 000000000000..d79fad9754ac --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view_py3.py new file mode 100644 index 000000000000..4de254438718 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_instance_view_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_py3.py new file mode 100644 index 000000000000..8fa667369a33 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update.py new file mode 100644 index 000000000000..b920ff57ff96 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update_py3.py new file mode 100644 index 000000000000..c32c18d32759 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extension_update_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result.py new file mode 100644 index 000000000000..a00529b436fb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result_py3.py new file mode 100644 index 000000000000..0b64c0d2cd38 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_extensions_list_result_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status.py new file mode 100644 index 000000000000..28c49e91d1e1 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status_py3.py new file mode 100644 index 000000000000..b6311ea93d34 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_health_status_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity.py new file mode 100644 index 000000000000..3c9fa46adfb9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity_py3.py new file mode 100644 index 000000000000..96d2849dfd9d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_identity_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image.py new file mode 100644 index 000000000000..ea35eefb5ad4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_py3.py new file mode 100644 index 000000000000..655c2909f7aa --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource.py new file mode 100644 index 000000000000..8807cc8f391b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource_py3.py new file mode 100644 index 000000000000..b9d63a8bc9e0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_image_resource_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view.py new file mode 100644 index 000000000000..8ba2eaf2f52a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

    For Linux Virtual Machines, you can easily view the output of + your console log.

    For both Windows and Linux virtual machines, + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view_py3.py new file mode 100644 index 000000000000..8c9fcff69f26 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_instance_view_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

    For Linux Virtual Machines, you can easily view the output of + your console log.

    For both Windows and Linux virtual machines, + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_paged.py new file mode 100644 index 000000000000..387e4c3f253f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_py3.py new file mode 100644 index 000000000000..8b8bfcc1bcee --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_py3.py @@ -0,0 +1,150 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 maintainance, 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 + :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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set.py new file mode 100644 index 000000000000..17f274dd926f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 stictly 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.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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk.py new file mode 100644 index 000000000000..945726144fd2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 name 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk_py3.py new file mode 100644 index 000000000000..8ff1b974e334 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_data_disk_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 name 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension.py new file mode 100644 index 000000000000..24a487547a2a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_paged.py new file mode 100644 index 000000000000..36a70d58d957 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile.py new file mode 100644 index 000000000000..918951d9fe26 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile_py3.py new file mode 100644 index 000000000000..c00f190696d9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_profile_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_py3.py new file mode 100644 index 000000000000..27392a2de9fd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_extension_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity.py new file mode 100644 index 000000000000..0d3064e622d2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity_py3.py new file mode 100644 index 000000000000..0d4c71f5c2e4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_identity_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view.py new file mode 100644 index 000000000000..1622490f7033 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_py3.py new file mode 100644 index 000000000000..b32213a53b1e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py new file mode 100644 index 000000000000..b0166ebb5800 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py new file mode 100644 index 000000000000..40b07db6f65e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration.py new file mode 100644 index 000000000000..cab729ab5dba --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration_py3.py new file mode 100644 index 000000000000..1c73ea10f6fd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_configuration_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag.py new file mode 100644 index 000000000000..36b70260d646 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag_py3.py new file mode 100644 index 000000000000..aaf788c9d772 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_ip_tag_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py new file mode 100644 index 000000000000..495309b9b2cf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py new file mode 100644 index 000000000000..68f66be2e34e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration.py new file mode 100644 index 000000000000..232955519b0f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py new file mode 100644 index 000000000000..04e1c619383f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py new file mode 100644 index 000000000000..5607f74d3c6a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_py3.py new file mode 100644 index 000000000000..d8847da6356d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_configuration_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile.py new file mode 100644 index 000000000000..b7b3854e671e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile_py3.py new file mode 100644 index 000000000000..4fd85adaca7a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_network_profile_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk.py new file mode 100644 index 000000000000..3c27a4373376 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk_py3.py new file mode 100644 index 000000000000..a9e21e153d4d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_disk_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile.py new file mode 100644 index 000000000000..fc813cc7a45f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile_py3.py new file mode 100644 index 000000000000..f6f5abf8eb58 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_os_profile_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_paged.py new file mode 100644 index 000000000000..5492e1f69e53 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration.py new file mode 100644 index 000000000000..373b43a6af6d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py new file mode 100644 index 000000000000..2fe562244372 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py new file mode 100644 index 000000000000..326a36708ff4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py new file mode 100644 index 000000000000..76a82b78db87 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_public_ip_address_configuration_py3.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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_py3.py new file mode 100644 index 000000000000..a618d08a4ee6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_py3.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 stictly 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.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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku.py new file mode 100644 index 000000000000..3c601b81ecda --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity.py new file mode 100644 index 000000000000..a54bfd2b20b1 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity_py3.py new file mode 100644 index 000000000000..e3906808d039 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_capacity_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_paged.py new file mode 100644 index 000000000000..e4ea6350b52c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_py3.py new file mode 100644 index 000000000000..2c0303850bc0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_sku_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile.py new file mode 100644 index 000000000000..c80219cb987d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile_py3.py new file mode 100644 index 000000000000..e10ef0ecaed2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_storage_profile_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update.py new file mode 100644 index 000000000000..150098be5e3a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration.py new file mode 100644 index 000000000000..6b71a481c5a0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py new file mode 100644 index 000000000000..25a443480dba --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_ip_configuration_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration.py new file mode 100644 index 000000000000..d0fcbff4ffb9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration_py3.py new file mode 100644 index 000000000000..131729e4532c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_configuration_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile.py new file mode 100644 index 000000000000..cd4f5f839764 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile_py3.py new file mode 100644 index 000000000000..5dcc3e1dd1f2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_network_profile_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk.py new file mode 100644 index 000000000000..1f48890ba840 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk.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 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 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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk_py3.py new file mode 100644 index 000000000000..420daf4f2dcf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_disk_py3.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 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 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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile.py new file mode 100644 index 000000000000..2ebc2b14b292 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile_py3.py new file mode 100644 index 000000000000..b54bfc2b563a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_os_profile_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py new file mode 100644 index 000000000000..0fc8d8517fcf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py new file mode 100644 index 000000000000..6675e7831652 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_py3.py new file mode 100644 index 000000000000..48bb74fb1948 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile.py new file mode 100644 index 000000000000..037ebc157fc8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile_py3.py new file mode 100644 index 000000000000..b442b5196c4e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_storage_profile_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile.py new file mode 100644 index 000000000000..88d5c0c10149 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile_py3.py new file mode 100644 index 000000000000..83cab7cf6fd0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_update_vm_profile_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm.py new file mode 100644 index 000000000000..204a62f62a0c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm.py @@ -0,0 +1,155 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.VirtualMachineInstanceView + :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 maintainance, 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] + """ + + _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': 'VirtualMachineInstanceView'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary.py new file mode 100644 index 000000000000..e9e19adfc1b6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py new file mode 100644 index 000000000000..c88df418881b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_extensions_summary_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids.py new file mode 100644 index 000000000000..772c66dad326 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py new file mode 100644 index 000000000000..658a8ccb87d5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_ids_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids.py new file mode 100644 index 000000000000..ece250dd4fd4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py new file mode 100644 index 000000000000..f32c6181467d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view.py new file mode 100644 index 000000000000..46c835c4dfd5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

    For Linux Virtual Machines, you can easily view the output of + your console log.

    For both Windows and Linux virtual machines, + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view_py3.py new file mode 100644 index 000000000000..6854c21d4706 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_instance_view_py3.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. +

    For Linux Virtual Machines, you can easily view the output of + your console log.

    For both Windows and Linux virtual machines, + 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_paged.py new file mode 100644 index 000000000000..52a46c26fd23 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile.py new file mode 100644 index 000000000000..177efbb43373 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile_py3.py new file mode 100644 index 000000000000..d7e74bb365b2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_profile_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_py3.py new file mode 100644 index 000000000000..bf822844f993 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_vm_py3.py @@ -0,0 +1,155 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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.VirtualMachineInstanceView + :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 maintainance, 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] + """ + + _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': 'VirtualMachineInstanceView'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size.py new file mode 100644 index 000000000000..0fef3efd6c8e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_paged.py new file mode 100644 index 000000000000..d8dc313a5c4a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_py3.py new file mode 100644 index 000000000000..9f99ba20ce42 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_size_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count.py new file mode 100644 index 000000000000..7df7b702acd7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count_py3.py new file mode 100644 index 000000000000..c38800073a95 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_status_code_count_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update.py new file mode 100644 index 000000000000..2b254de4ccaf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update.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 .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 maintainance, 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 + :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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update_py3.py new file mode 100644 index 000000000000..be9a3fc3e904 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_update_py3.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 .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 maintainance, 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 + :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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration.py new file mode 100644 index 000000000000..0d429a3c06eb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration_py3.py new file mode 100644 index 000000000000..4a3c13531623 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_configuration_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener.py new file mode 100644 index 000000000000..dd80b495e328 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener_py3.py new file mode 100644 index 000000000000..a4aae022b007 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/win_rm_listener_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration.py new file mode 100644 index 000000000000..a8341ce9d8bb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration_py3.py new file mode 100644 index 000000000000..fe5fc14e963f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/windows_configuration_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py index aceddf83543c..48abff4beece 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py @@ -9,10 +9,40 @@ # 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_machine_images_operations import VirtualMachineImagesOperations +from .usage_operations import UsageOperations +from .virtual_machine_sizes_operations import VirtualMachineSizesOperations +from .images_operations import ImagesOperations +from .virtual_machines_operations import VirtualMachinesOperations +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', + 'AvailabilitySetsOperations', + 'VirtualMachineExtensionImagesOperations', + 'VirtualMachineExtensionsOperations', + 'VirtualMachineImagesOperations', + 'UsageOperations', + 'VirtualMachineSizesOperations', + 'ImagesOperations', + 'VirtualMachinesOperations', + 'VirtualMachineScaleSetsOperations', + 'VirtualMachineScaleSetExtensionsOperations', + 'VirtualMachineScaleSetRollingUpgradesOperations', + 'VirtualMachineScaleSetVMsOperations', + 'LogAnalyticsOperations', + 'VirtualMachineRunCommandsOperations', 'DisksOperations', 'SnapshotsOperations', ] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py new file mode 100644 index 000000000000..ba8e21445a27 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py @@ -0,0 +1,434 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/disks_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/disks_operations.py index c066a2195933..fbc2afa3489b 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/disks_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/disks_operations.py @@ -351,17 +351,10 @@ def _delete_initial( exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, 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. @@ -378,12 +371,10 @@ def delete( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse]] + :return: An instance of LROPoller that returns None or + ClientRawResponse 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( @@ -395,14 +386,10 @@ def delete( ) def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -690,17 +677,10 @@ def _revoke_access_initial( exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, 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. @@ -717,12 +697,10 @@ def revoke_access( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse]] + :return: An instance of LROPoller that returns None or + ClientRawResponse 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( @@ -734,14 +712,10 @@ def revoke_access( ) def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/images_operations.py new file mode 100644 index 000000000000..030bf14e5115 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/images_operations.py @@ -0,0 +1,525 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/log_analytics_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/log_analytics_operations.py new file mode 100644 index 000000000000..0471d6db9c03 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/log_analytics_operations.py @@ -0,0 +1,242 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = 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, **operation_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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = 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, **operation_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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/operations.py new file mode 100644 index 000000000000..a392e2cea622 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/snapshots_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/snapshots_operations.py index b6c4d1bf4b74..c65e1d1dc86b 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/snapshots_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/snapshots_operations.py @@ -351,17 +351,10 @@ def _delete_initial( exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, 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. @@ -378,12 +371,10 @@ def delete( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse]] + :return: An instance of LROPoller that returns None or + ClientRawResponse 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( @@ -395,14 +386,10 @@ def delete( ) def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -690,17 +677,10 @@ def _revoke_access_initial( exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, 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. @@ -717,12 +697,10 @@ def revoke_access( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationStatusResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_04_01.models.OperationStatusResponse]] + :return: An instance of LROPoller that returns None or + ClientRawResponse 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( @@ -734,14 +712,10 @@ def revoke_access( ) def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/usage_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/usage_operations.py new file mode 100644 index 000000000000..607b8419477c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/usage_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extension_images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extension_images_operations.py new file mode 100644 index 000000000000..f190183923a8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extension_images_operations.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. +# -------------------------------------------------------------------------- + +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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extensions_operations.py new file mode 100644 index 000000000000..5acd2642f6e4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_extensions_operations.py @@ -0,0 +1,480 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_images_operations.py new file mode 100644 index 000000000000..a58d2e394655 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_images_operations.py @@ -0,0 +1,383 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_run_commands_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_run_commands_operations.py new file mode 100644 index 000000000000..9d04988797f7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_run_commands_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_extensions_operations.py new file mode 100644 index 000000000000..5d5476f92263 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_extensions_operations.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py new file mode 100644 index 000000000000..81ffdda5f87e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_rolling_upgrades_operations.py @@ -0,0 +1,267 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_vms_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_vms_operations.py new file mode 100644 index 000000000000..8ebd8a2fd266 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_set_vms_operations.py @@ -0,0 +1,1131 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_sets_operations.py new file mode 100644 index 000000000000..0b8f451521c5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_scale_sets_operations.py @@ -0,0 +1,1762 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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. + + :param resource_group_name: The name of the resource group. + :type 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_sizes_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..0eef7f65066c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machine_sizes_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machines_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machines_operations.py new file mode 100644 index 000000000000..ebe8cbd87fd8 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/virtual_machines_operations.py @@ -0,0 +1,1494 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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 _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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = 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, **operation_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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[InstanceViewStatus]', 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 list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.compute.v2018_04_01.models.InstanceViewStatus]]] + :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('[InstanceViewStatus]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py new file mode 100644 index 000000000000..88ded2f640de --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 .version import VERSION + +__all__ = ['ComputeManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/compute_management_client.py new file mode 100644 index 000000000000..a0928105b324 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/compute_management_client.py @@ -0,0 +1,95 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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.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 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 + + :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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py new file mode 100644 index 000000000000..39442e272bac --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.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. +# -------------------------------------------------------------------------- + +try: + 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 .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 .api_error_base_py3 import ApiErrorBase + from .inner_error_py3 import InnerError + from .api_error_py3 import ApiError + from .resource_py3 import Resource +except (SyntaxError, ImportError): + 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 .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 .api_error_base import ApiErrorBase + from .inner_error import InnerError + from .api_error import ApiError + from .resource import Resource +from .gallery_paged import GalleryPaged +from .gallery_image_paged import GalleryImagePaged +from .gallery_image_version_paged import GalleryImageVersionPaged +from .compute_management_client_enums import ( + OperatingSystemTypes, + OperatingSystemStateTypes, + ScaleTier, + AggregatedReplicationState, + ReplicationState, + HostCaching, + ReplicationStatusTypes, +) + +__all__ = [ + 'GalleryIdentifier', + 'Gallery', + 'GalleryImageIdentifier', + 'ResourceRange', + 'RecommendedMachineConfiguration', + 'Disallowed', + 'ImagePurchasePlan', + 'GalleryImage', + 'GalleryImageVersionPublishingProfile', + 'GalleryOSDiskImage', + 'GalleryDataDiskImage', + 'GalleryImageVersionStorageProfile', + 'RegionalReplicationStatus', + 'ReplicationStatus', + 'GalleryImageVersion', + 'ManagedArtifact', + 'GalleryArtifactSource', + 'GalleryArtifactPublishingProfileBase', + 'GalleryDiskImage', + 'ApiErrorBase', + 'InnerError', + 'ApiError', + 'Resource', + 'GalleryPaged', + 'GalleryImagePaged', + 'GalleryImageVersionPaged', + 'OperatingSystemTypes', + 'OperatingSystemStateTypes', + 'ScaleTier', + 'AggregatedReplicationState', + 'ReplicationState', + 'HostCaching', + 'ReplicationStatusTypes', +] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error.py new file mode 100644 index 000000000000..8771ac2086c0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base.py new file mode 100644 index 000000000000..655c08638905 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base_py3.py new file mode 100644 index 000000000000..5ba95aa0283e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_base_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_py3.py new file mode 100644 index 000000000000..c09870827f5f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/api_error_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py new file mode 100644 index 000000000000..c575a854046e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 OperatingSystemTypes(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class OperatingSystemStateTypes(str, Enum): + + generalized = "Generalized" + specialized = "Specialized" + + +class ScaleTier(str, Enum): + + s30 = "S30" + s100 = "S100" + + +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 ReplicationStatusTypes(str, Enum): + + replication_status = "ReplicationStatus" diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed.py new file mode 100644 index 000000000000..4269dd604e66 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed_py3.py new file mode 100644 index 000000000000..95e07d7a7533 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/disallowed_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery.py new file mode 100644 index 000000000000..5dfdc18e1734 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 gallery resource. + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base.py new file mode 100644 index 000000000000..8b01e7c2da2c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. + + :param regions: The regions where the artifact is going to be published. + :type regions: list[str] + :param source: + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + } + + def __init__(self, **kwargs): + super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) + self.regions = kwargs.get('regions', None) + self.source = kwargs.get('source', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base_py3.py new file mode 100644 index 000000000000..5a69aa10ec9e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_publishing_profile_base_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. + + :param regions: The regions where the artifact is going to be published. + :type regions: list[str] + :param source: + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + } + + def __init__(self, *, regions=None, source=None, **kwargs) -> None: + super(GalleryArtifactPublishingProfileBase, self).__init__(**kwargs) + self.regions = regions + self.source = source diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source.py new file mode 100644 index 000000000000..a4b32f9ccb89 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 of the gallery artifact. + + :param managed_image: + :type managed_image: + ~azure.mgmt.compute.v2018_06_01.models.ManagedArtifact + """ + + _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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source_py3.py new file mode 100644 index 000000000000..77e793f91b43 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_artifact_source_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 of the gallery artifact. + + :param managed_image: + :type managed_image: + ~azure.mgmt.compute.v2018_06_01.models.ManagedArtifact + """ + + _attribute_map = { + 'managed_image': {'key': 'managedImage', 'type': 'ManagedArtifact'}, + } + + def __init__(self, *, managed_image=None, **kwargs) -> None: + super(GalleryArtifactSource, self).__init__(**kwargs) + self.managed_image = managed_image diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py new file mode 100644 index 000000000000..88efa05270a0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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: It indicates the size of the VHD to create. + :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: 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 = { + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py new file mode 100644 index 000000000000..06b2a569818b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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: It indicates the size of the VHD to create. + :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: 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 = { + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py new file mode 100644 index 000000000000..b99d727114c9 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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: It indicates the size of the VHD to create. + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py new file mode 100644 index 000000000000..c27888c9a07e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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: It indicates the size of the VHD to create. + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py new file mode 100644 index 000000000000..015fc199542e --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 gallery + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py new file mode 100644 index 000000000000..2b7f4e6555a6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 gallery + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py new file mode 100644 index 000000000000..21af4252c4bf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 resource. + :type description: str + :param eula: The Eula agreement for the gallery image. + :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: 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 os_state: The OS State. 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 of this gallery image. + :type end_of_life_date: datetime + :param identifier: + :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. 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'}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier.py new file mode 100644 index 000000000000..2f27b4d520aa --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 identifier. + + :param publisher: The gallery image publisher name. + :type publisher: str + :param offer: The gallery image offer name. + :type offer: str + :param sku: The gallery image sku name. + :type sku: str + """ + + _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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier_py3.py new file mode 100644 index 000000000000..b858e464271c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_identifier_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 identifier. + + :param publisher: The gallery image publisher name. + :type publisher: str + :param offer: The gallery image offer name. + :type offer: str + :param sku: The gallery image sku name. + :type sku: str + """ + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, **kwargs) -> None: + super(GalleryImageIdentifier, self).__init__(**kwargs) + self.publisher = publisher + self.offer = offer + self.sku = sku diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_paged.py new file mode 100644 index 000000000000..33a318d5f30d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py new file mode 100644 index 000000000000..ea37cbf9541b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 resource. + :type description: str + :param eula: The Eula agreement for the gallery image. + :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: 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 os_state: The OS State. 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 of this gallery image. + :type end_of_life_date: datetime + :param identifier: + :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. 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'}, + '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, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, os_type=None, os_state=None, end_of_life_date=None, identifier=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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py new file mode 100644 index 000000000000..69cdf916c67b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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: + :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}, + '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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_paged.py new file mode 100644 index 000000000000..3e87c3b3f77f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py new file mode 100644 index 000000000000..e475a6192ec7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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. + + :param regions: The regions where the artifact is going to be published. + :type regions: list[str] + :param source: + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + :param scale_tier: The scale tier of the gallery image version. Valid + values are 'S30' and 'S100'. Possible values include: 'S30', 'S100' + :type scale_tier: str or ~azure.mgmt.compute.v2018_06_01.models.ScaleTier + :param exclude_from_latest: The flag means that if it is set to true, + people deploying VMs with 'latest' as version will not use this version. + :type exclude_from_latest: bool + :ivar published_date: The time 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. + :type end_of_life_date: datetime + """ + + _validation = { + 'published_date': {'readonly': True}, + } + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + 'scale_tier': {'key': 'scaleTier', 'type': 'str'}, + '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.scale_tier = kwargs.get('scale_tier', 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py new file mode 100644 index 000000000000..13b13fdd244f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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. + + :param regions: The regions where the artifact is going to be published. + :type regions: list[str] + :param source: + :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource + :param scale_tier: The scale tier of the gallery image version. Valid + values are 'S30' and 'S100'. Possible values include: 'S30', 'S100' + :type scale_tier: str or ~azure.mgmt.compute.v2018_06_01.models.ScaleTier + :param exclude_from_latest: The flag means that if it is set to true, + people deploying VMs with 'latest' as version will not use this version. + :type exclude_from_latest: bool + :ivar published_date: The time 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. + :type end_of_life_date: datetime + """ + + _validation = { + 'published_date': {'readonly': True}, + } + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, + 'scale_tier': {'key': 'scaleTier', 'type': 'str'}, + '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, *, regions=None, source=None, scale_tier=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None: + super(GalleryImageVersionPublishingProfile, self).__init__(regions=regions, source=source, **kwargs) + self.scale_tier = scale_tier + self.exclude_from_latest = exclude_from_latest + self.published_date = None + self.end_of_life_date = end_of_life_date diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py new file mode 100644 index 000000000000..b01071bd2279 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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: + :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}, + '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, tags=None, publishing_profile=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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py new file mode 100644 index 000000000000..0a213a2f051d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py new file mode 100644 index 000000000000..ea45b454b07c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py new file mode 100644 index 000000000000..75b6dde7e996 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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: It indicates the size of the VHD to create. + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py new file mode 100644 index 000000000000..8981e015c475 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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: It indicates the size of the VHD to create. + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_paged.py new file mode 100644 index 000000000000..4b9ba1b78cee --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_py3.py new file mode 100644 index 000000000000..87dcabacdbe7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license 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 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 gallery resource. + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan.py new file mode 100644 index 000000000000..842a22340e45 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan_py3.py new file mode 100644 index 000000000000..228dcc61c77c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_purchase_plan_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error.py new file mode 100644 index 000000000000..6324249d7c19 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error_py3.py new file mode 100644 index 000000000000..ccec30d7b53f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/inner_error_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact.py new file mode 100644 index 000000000000..75d0cf2708c0 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. + + :param id: The managed artifact id. + :type id: str + """ + + _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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact_py3.py new file mode 100644 index 000000000000..2afb7d06ce6a --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/managed_artifact_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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. + + :param id: The managed artifact id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ManagedArtifact, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration.py new file mode 100644 index 000000000000..db452883a30c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """Describes the recommended machine configuration. + + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration_py3.py new file mode 100644 index 000000000000..0473d92f01d5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/recommended_machine_configuration_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """Describes the recommended machine configuration. + + :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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py new file mode 100644 index 000000000000..ac541c4f4080 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 where the gallery image version is published 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py new file mode 100644 index 000000000000..4838b5542b8c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 where the gallery image version is published 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py new file mode 100644 index 000000000000..5d20b80672e2 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 + the regional replication status. 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py new file mode 100644 index 000000000000..c492353698fd --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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 + the regional replication status. 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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource.py new file mode 100644 index 000000000000..5dd7d481c685 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_py3.py new file mode 100644 index 000000000000..2f3702caf609 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_py3.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.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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range.py new file mode 100644 index 000000000000..6ebd52ac68d6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range_py3.py new file mode 100644 index 000000000000..8ce42edfcc6d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/resource_range_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py new file mode 100644 index 000000000000..e058803d6884 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .galleries_operations import GalleriesOperations +from .gallery_images_operations import GalleryImagesOperations +from .gallery_image_versions_operations import GalleryImageVersionsOperations + +__all__ = [ + 'GalleriesOperations', + 'GalleryImagesOperations', + 'GalleryImageVersionsOperations', +] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py new file mode 100644 index 000000000000..b05139317ddf --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py @@ -0,0 +1,420 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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 gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the gallery. + :type gallery_name: str + :param gallery: Parameters supplied to the create or update 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 gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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 gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the gallery. + :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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py new file mode 100644 index 000000000000..3acc16a4d1bc --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py @@ -0,0 +1,395 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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 gallery. + :type gallery_name: str + :param gallery_image_name: The name of the gallery image. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery image + version. 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 gallery. + :type gallery_name: str + :param gallery_image_name: The name of the gallery image. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery image + version. + :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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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 gallery. + :type gallery_name: str + :param gallery_image_name: The name of the gallery image. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery image + version. + :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 under 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 gallery. + :type gallery_name: str + :param gallery_image_name: The name of the gallery image. + :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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py new file mode 100644 index 000000000000..fc8b6ff9f1ac --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py @@ -0,0 +1,370 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send( + request, header_parameters, body_content, 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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the gallery. + :type gallery_name: str + :param gallery_image_name: The name of the gallery image. + :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. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the gallery. + :type gallery_name: str + :param gallery_image_name: The name of the gallery image. + :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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = 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 = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not 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) + response = self._client.send(request, header_parameters, 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 gallery. + :type gallery_name: str + :param gallery_image_name: The name of the gallery image. + :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 images under a gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the 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: 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['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.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/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/version.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/version.py new file mode 100644 index 000000000000..5f1af9fb17b6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2018-06-01" +