diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py
index 00630f63ce9d..e90c8dab3a08 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py
@@ -9,81 +9,158 @@
# regenerated.
# --------------------------------------------------------------------------
-from .instance_view_status import InstanceViewStatus
-from .sub_resource import SubResource
-from .availability_set import AvailabilitySet
-from .virtual_machine_size import VirtualMachineSize
-from .virtual_machine_extension_image import VirtualMachineExtensionImage
-from .virtual_machine_image_resource import VirtualMachineImageResource
-from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
-from .virtual_machine_extension import VirtualMachineExtension
-from .purchase_plan import PurchasePlan
-from .os_disk_image import OSDiskImage
-from .data_disk_image import DataDiskImage
-from .virtual_machine_image import VirtualMachineImage
-from .usage_name import UsageName
-from .usage import Usage
-from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
-from .virtual_machine_capture_result import VirtualMachineCaptureResult
-from .plan import Plan
-from .hardware_profile import HardwareProfile
-from .image_reference import ImageReference
-from .key_vault_secret_reference import KeyVaultSecretReference
-from .key_vault_key_reference import KeyVaultKeyReference
-from .disk_encryption_settings import DiskEncryptionSettings
-from .virtual_hard_disk import VirtualHardDisk
-from .os_disk import OSDisk
-from .data_disk import DataDisk
-from .storage_profile import StorageProfile
-from .additional_unattend_content import AdditionalUnattendContent
-from .win_rm_listener import WinRMListener
-from .win_rm_configuration import WinRMConfiguration
-from .windows_configuration import WindowsConfiguration
-from .ssh_public_key import SshPublicKey
-from .ssh_configuration import SshConfiguration
-from .linux_configuration import LinuxConfiguration
-from .vault_certificate import VaultCertificate
-from .vault_secret_group import VaultSecretGroup
-from .os_profile import OSProfile
-from .network_interface_reference import NetworkInterfaceReference
-from .network_profile import NetworkProfile
-from .boot_diagnostics import BootDiagnostics
-from .diagnostics_profile import DiagnosticsProfile
-from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
-from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
-from .disk_instance_view import DiskInstanceView
-from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
-from .virtual_machine_instance_view import VirtualMachineInstanceView
-from .virtual_machine import VirtualMachine
-from .sku import Sku
-from .upgrade_policy import UpgradePolicy
-from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
-from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
-from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
-from .api_entity_reference import ApiEntityReference
-from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
-from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
-from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
-from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
-from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
-from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
-from .virtual_machine_scale_set import VirtualMachineScaleSet
-from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
-from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
-from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
-from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
-from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
-from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
-from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
-from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
-from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM
-from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView
-from .api_error_base import ApiErrorBase
-from .inner_error import InnerError
-from .api_error import ApiError
-from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
-from .resource import Resource
-from .operation_status_response import OperationStatusResponse
+try:
+ from .instance_view_status_py3 import InstanceViewStatus
+ from .sub_resource_py3 import SubResource
+ from .availability_set_py3 import AvailabilitySet
+ from .virtual_machine_size_py3 import VirtualMachineSize
+ from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource_py3 import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension_py3 import VirtualMachineExtension
+ from .purchase_plan_py3 import PurchasePlan
+ from .os_disk_image_py3 import OSDiskImage
+ from .data_disk_image_py3 import DataDiskImage
+ from .virtual_machine_image_py3 import VirtualMachineImage
+ from .usage_name_py3 import UsageName
+ from .usage_py3 import Usage
+ from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult
+ from .plan_py3 import Plan
+ from .hardware_profile_py3 import HardwareProfile
+ from .image_reference_py3 import ImageReference
+ from .key_vault_secret_reference_py3 import KeyVaultSecretReference
+ from .key_vault_key_reference_py3 import KeyVaultKeyReference
+ from .disk_encryption_settings_py3 import DiskEncryptionSettings
+ from .virtual_hard_disk_py3 import VirtualHardDisk
+ from .os_disk_py3 import OSDisk
+ from .data_disk_py3 import DataDisk
+ from .storage_profile_py3 import StorageProfile
+ from .additional_unattend_content_py3 import AdditionalUnattendContent
+ from .win_rm_listener_py3 import WinRMListener
+ from .win_rm_configuration_py3 import WinRMConfiguration
+ from .windows_configuration_py3 import WindowsConfiguration
+ from .ssh_public_key_py3 import SshPublicKey
+ from .ssh_configuration_py3 import SshConfiguration
+ from .linux_configuration_py3 import LinuxConfiguration
+ from .vault_certificate_py3 import VaultCertificate
+ from .vault_secret_group_py3 import VaultSecretGroup
+ from .os_profile_py3 import OSProfile
+ from .network_interface_reference_py3 import NetworkInterfaceReference
+ from .network_profile_py3 import NetworkProfile
+ from .boot_diagnostics_py3 import BootDiagnostics
+ from .diagnostics_profile_py3 import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView
+ from .disk_instance_view_py3 import DiskInstanceView
+ from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView
+ from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView
+ from .virtual_machine_py3 import VirtualMachine
+ from .sku_py3 import Sku
+ from .upgrade_policy_py3 import UpgradePolicy
+ from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile
+ from .api_entity_reference_py3 import ApiEntityReference
+ from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku
+ from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM
+ from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView
+ from .api_error_base_py3 import ApiErrorBase
+ from .inner_error_py3 import InnerError
+ from .api_error_py3 import ApiError
+ from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties
+ from .resource_py3 import Resource
+ from .operation_status_response_py3 import OperationStatusResponse
+except (SyntaxError, ImportError):
+ from .instance_view_status import InstanceViewStatus
+ from .sub_resource import SubResource
+ from .availability_set import AvailabilitySet
+ from .virtual_machine_size import VirtualMachineSize
+ from .virtual_machine_extension_image import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension import VirtualMachineExtension
+ from .purchase_plan import PurchasePlan
+ from .os_disk_image import OSDiskImage
+ from .data_disk_image import DataDiskImage
+ from .virtual_machine_image import VirtualMachineImage
+ from .usage_name import UsageName
+ from .usage import Usage
+ from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result import VirtualMachineCaptureResult
+ from .plan import Plan
+ from .hardware_profile import HardwareProfile
+ from .image_reference import ImageReference
+ from .key_vault_secret_reference import KeyVaultSecretReference
+ from .key_vault_key_reference import KeyVaultKeyReference
+ from .disk_encryption_settings import DiskEncryptionSettings
+ from .virtual_hard_disk import VirtualHardDisk
+ from .os_disk import OSDisk
+ from .data_disk import DataDisk
+ from .storage_profile import StorageProfile
+ from .additional_unattend_content import AdditionalUnattendContent
+ from .win_rm_listener import WinRMListener
+ from .win_rm_configuration import WinRMConfiguration
+ from .windows_configuration import WindowsConfiguration
+ from .ssh_public_key import SshPublicKey
+ from .ssh_configuration import SshConfiguration
+ from .linux_configuration import LinuxConfiguration
+ from .vault_certificate import VaultCertificate
+ from .vault_secret_group import VaultSecretGroup
+ from .os_profile import OSProfile
+ from .network_interface_reference import NetworkInterfaceReference
+ from .network_profile import NetworkProfile
+ from .boot_diagnostics import BootDiagnostics
+ from .diagnostics_profile import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
+ from .disk_instance_view import DiskInstanceView
+ from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
+ from .virtual_machine_instance_view import VirtualMachineInstanceView
+ from .virtual_machine import VirtualMachine
+ from .sku import Sku
+ from .upgrade_policy import UpgradePolicy
+ from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
+ from .api_entity_reference import ApiEntityReference
+ from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
+ from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM
+ from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView
+ from .api_error_base import ApiErrorBase
+ from .inner_error import InnerError
+ from .api_error import ApiError
+ from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
+ from .resource import Resource
+ from .operation_status_response import OperationStatusResponse
from .availability_set_paged import AvailabilitySetPaged
from .virtual_machine_size_paged import VirtualMachineSizePaged
from .usage_paged import UsagePaged
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content.py
index 16a3fd357595..13297864f6d3 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content.py
@@ -44,9 +44,9 @@ class AdditionalUnattendContent(Model):
'content': {'key': 'content', 'type': 'str'},
}
- def __init__(self, pass_name=None, component_name=None, setting_name=None, content=None):
- super(AdditionalUnattendContent, self).__init__()
- self.pass_name = pass_name
- self.component_name = component_name
- self.setting_name = setting_name
- self.content = content
+ 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/v2015_06_15/models/additional_unattend_content_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/additional_unattend_content_py3.py
new file mode 100644
index 000000000000..c003a69e41a0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.PassNames
+ :param component_name: The component name. Currently, the only allowable
+ value is Microsoft-Windows-Shell-Setup. Possible values include:
+ 'Microsoft-Windows-Shell-Setup'
+ :type component_name: str or
+ ~azure.mgmt.compute.v2015_06_15.models.ComponentNames
+ :param setting_name: Specifies the name of the setting to which the
+ content applies. Possible values are: FirstLogonCommands and AutoLogon.
+ Possible values include: 'AutoLogon', 'FirstLogonCommands'
+ :type setting_name: str or
+ ~azure.mgmt.compute.v2015_06_15.models.SettingNames
+ :param content: Specifies the XML formatted content that is added to the
+ unattend.xml file for the specified path and component. The XML must be
+ less than 4KB and must include the root element for the setting or feature
+ that is being inserted.
+ :type content: str
+ """
+
+ _attribute_map = {
+ 'pass_name': {'key': 'passName', 'type': 'PassNames'},
+ 'component_name': {'key': 'componentName', 'type': 'ComponentNames'},
+ 'setting_name': {'key': 'settingName', 'type': 'SettingNames'},
+ 'content': {'key': 'content', 'type': 'str'},
+ }
+
+ def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None:
+ super(AdditionalUnattendContent, self).__init__(**kwargs)
+ self.pass_name = pass_name
+ self.component_name = component_name
+ self.setting_name = setting_name
+ self.content = content
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference.py
index 27696aacc3dc..d1bf572e916d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference.py
@@ -24,6 +24,6 @@ class ApiEntityReference(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(ApiEntityReference, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(ApiEntityReference, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_entity_reference_py3.py
new file mode 100644
index 000000000000..da3e07082381
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/api_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error.py
index 84aa0b473897..79b4f00b21d6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error.py
@@ -35,10 +35,10 @@ class ApiError(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, details=None, innererror=None, code=None, target=None, message=None):
- super(ApiError, self).__init__()
- self.details = details
- self.innererror = innererror
- self.code = code
- self.target = target
- self.message = message
+ 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/v2015_06_15/models/api_error_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base.py
index 2fb33a0ff411..655c08638905 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base.py
@@ -29,8 +29,8 @@ class ApiErrorBase(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, code=None, target=None, message=None):
- super(ApiErrorBase, self).__init__()
- self.code = code
- self.target = target
- self.message = message
+ 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/v2015_06_15/models/api_error_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_base_py3.py
new file mode 100644
index 000000000000..5ba95aa0283e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/api_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/api_error_py3.py
new file mode 100644
index 000000000000..5aa2f113bea0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.ApiErrorBase]
+ :param innererror: The Api inner error
+ :type innererror: ~azure.mgmt.compute.v2015_06_15.models.InnerError
+ :param code: The error code.
+ :type code: str
+ :param target: The target of the particular error.
+ :type target: str
+ :param message: The error message.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'details': {'key': 'details', 'type': '[ApiErrorBase]'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ 'code': {'key': 'code', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None:
+ super(ApiError, self).__init__(**kwargs)
+ self.details = details
+ self.innererror = innererror
+ self.code = code
+ self.target = target
+ self.message = message
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set.py
index c683cf490198..eb83102f6d73 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set.py
@@ -28,13 +28,15 @@ class AvailabilitySet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -71,9 +73,9 @@ class AvailabilitySet(Resource):
'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, location, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None):
- super(AvailabilitySet, self).__init__(location=location, tags=tags)
- self.platform_update_domain_count = platform_update_domain_count
- self.platform_fault_domain_count = platform_fault_domain_count
- self.virtual_machines = virtual_machines
+ def __init__(self, **kwargs):
+ super(AvailabilitySet, self).__init__(**kwargs)
+ self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None)
+ self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None)
+ self.virtual_machines = kwargs.get('virtual_machines', None)
self.statuses = None
diff --git a/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
new file mode 100644
index 000000000000..3df77ebfa38c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/availability_set_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 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.v2015_06_15.models.SubResource]
+ :ivar statuses: The resource status information.
+ :vartype statuses:
+ list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'statuses': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
+ 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
+ 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
+ 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, **kwargs) -> None:
+ super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs)
+ self.platform_update_domain_count = platform_update_domain_count
+ self.platform_fault_domain_count = platform_fault_domain_count
+ self.virtual_machines = virtual_machines
+ self.statuses = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics.py
index c94d188e3fba..ca3dbdd4f23c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics.py
@@ -32,7 +32,7 @@ class BootDiagnostics(Model):
'storage_uri': {'key': 'storageUri', 'type': 'str'},
}
- def __init__(self, enabled=None, storage_uri=None):
- super(BootDiagnostics, self).__init__()
- self.enabled = enabled
- self.storage_uri = storage_uri
+ 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/v2015_06_15/models/boot_diagnostics_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view.py
index 4ec7b385558d..6fe1f84a3910 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view.py
@@ -26,7 +26,7 @@ class BootDiagnosticsInstanceView(Model):
'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'},
}
- def __init__(self, console_screenshot_blob_uri=None, serial_console_log_blob_uri=None):
- super(BootDiagnosticsInstanceView, self).__init__()
- self.console_screenshot_blob_uri = console_screenshot_blob_uri
- self.serial_console_log_blob_uri = serial_console_log_blob_uri
+ 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/v2015_06_15/models/boot_diagnostics_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view_py3.py
new file mode 100644
index 000000000000..d85b51981ab9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/boot_diagnostics_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_py3.py
new file mode 100644
index 000000000000..b0a756ea4fa0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/compute_long_running_operation_properties.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties.py
index f8ca23e0ccdf..66ff353eb206 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties.py
@@ -23,6 +23,6 @@ class ComputeLongRunningOperationProperties(Model):
'output': {'key': 'output', 'type': 'object'},
}
- def __init__(self, output=None):
- super(ComputeLongRunningOperationProperties, self).__init__()
- self.output = output
+ def __init__(self, **kwargs):
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties_py3.py
new file mode 100644
index 000000000000..a4ffd6c8c32f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_long_running_operation_properties_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 ComputeLongRunningOperationProperties(Model):
+ """Compute-specific operation properties, including output.
+
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'output': {'key': 'output', 'type': 'object'},
+ }
+
+ def __init__(self, *, output=None, **kwargs) -> None:
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_management_client_enums.py
index f09f0ffb3526..1276832aadd7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_management_client_enums.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/compute_management_client_enums.py
@@ -12,20 +12,20 @@
from enum import Enum
-class StatusLevelTypes(Enum):
+class StatusLevelTypes(str, Enum):
info = "Info"
warning = "Warning"
error = "Error"
-class OperatingSystemTypes(Enum):
+class OperatingSystemTypes(str, Enum):
windows = "Windows"
linux = "Linux"
-class VirtualMachineSizeTypes(Enum):
+class VirtualMachineSizeTypes(str, Enum):
basic_a0 = "Basic_A0"
basic_a1 = "Basic_A1"
@@ -81,54 +81,54 @@ class VirtualMachineSizeTypes(Enum):
standard_gs5 = "Standard_GS5"
-class CachingTypes(Enum):
+class CachingTypes(str, Enum):
none = "None"
read_only = "ReadOnly"
read_write = "ReadWrite"
-class DiskCreateOptionTypes(Enum):
+class DiskCreateOptionTypes(str, Enum):
from_image = "FromImage"
empty = "Empty"
attach = "Attach"
-class PassNames(Enum):
+class PassNames(str, Enum):
oobe_system = "OobeSystem"
-class ComponentNames(Enum):
+class ComponentNames(str, Enum):
microsoft_windows_shell_setup = "Microsoft-Windows-Shell-Setup"
-class SettingNames(Enum):
+class SettingNames(str, Enum):
auto_logon = "AutoLogon"
first_logon_commands = "FirstLogonCommands"
-class ProtocolTypes(Enum):
+class ProtocolTypes(str, Enum):
http = "Http"
https = "Https"
-class UpgradeMode(Enum):
+class UpgradeMode(str, Enum):
automatic = "Automatic"
manual = "Manual"
-class VirtualMachineScaleSetSkuScaleType(Enum):
+class VirtualMachineScaleSetSkuScaleType(str, Enum):
automatic = "Automatic"
none = "None"
-class InstanceViewTypes(Enum):
+class InstanceViewTypes(str, Enum):
instance_view = "instanceView"
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk.py
index 3cf5517e09c0..d21d64c3c2ea 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk.py
@@ -15,13 +15,15 @@
class DataDisk(Model):
"""Describes a data disk.
- :param 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.
+ 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.
+ :param name: Required. The disk name.
:type name: str
- :param vhd: The virtual hard disk.
+ :param vhd: Required. The virtual hard disk.
:type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk
:param image: The source user image virtual hard disk. The virtual hard
disk will be copied before being attached to the virtual machine. If
@@ -33,8 +35,8 @@ class DataDisk(Model):
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -66,12 +68,12 @@ class DataDisk(Model):
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
}
- def __init__(self, lun, name, vhd, create_option, image=None, caching=None, disk_size_gb=None):
- super(DataDisk, self).__init__()
- self.lun = lun
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
+ def __init__(self, **kwargs):
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = kwargs.get('lun', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image.py
index 60a4befc525f..b5dbfcefb472 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image.py
@@ -32,6 +32,6 @@ class DataDiskImage(Model):
'lun': {'key': 'lun', 'type': 'int'},
}
- def __init__(self):
- super(DataDiskImage, self).__init__()
+ def __init__(self, **kwargs):
+ super(DataDiskImage, self).__init__(**kwargs)
self.lun = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_image_py3.py
new file mode 100644
index 000000000000..8431a3988502
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_py3.py
new file mode 100644
index 000000000000..c273f2037df3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/data_disk_py3.py
@@ -0,0 +1,79 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DataDisk(Model):
+ """Describes a data disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
+ :type lun: int
+ :param name: Required. The disk name.
+ :type name: str
+ :param vhd: Required. The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the name of the disk in a
+ virtual machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ 'name': {'required': True},
+ 'vhd': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ }
+
+ def __init__(self, *, lun: int, name: str, vhd, create_option, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None:
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = lun
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile.py
index 0971788fa80e..d801c39f51d5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile.py
@@ -29,6 +29,6 @@ class DiagnosticsProfile(Model):
'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
}
- def __init__(self, boot_diagnostics=None):
- super(DiagnosticsProfile, self).__init__()
- self.boot_diagnostics = boot_diagnostics
+ 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/v2015_06_15/models/diagnostics_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/diagnostics_profile_py3.py
new file mode 100644
index 000000000000..c2fee8c4a669
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.BootDiagnostics
+ """
+
+ _attribute_map = {
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
+ }
+
+ def __init__(self, *, boot_diagnostics=None, **kwargs) -> None:
+ super(DiagnosticsProfile, self).__init__(**kwargs)
+ self.boot_diagnostics = boot_diagnostics
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings.py
index edb96710e7f5..145e72b0f2c9 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings.py
@@ -15,8 +15,10 @@
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.
+ All required parameters must be populated in order to send to Azure.
+
+ :param disk_encryption_key: Required. Specifies the location of the disk
+ encryption key, which is a Key Vault Secret.
:type disk_encryption_key:
~azure.mgmt.compute.v2015_06_15.models.KeyVaultSecretReference
:param key_encryption_key: Specifies the location of the key encryption
@@ -38,8 +40,8 @@ class DiskEncryptionSettings(Model):
'enabled': {'key': 'enabled', 'type': 'bool'},
}
- def __init__(self, disk_encryption_key, key_encryption_key=None, enabled=None):
- super(DiskEncryptionSettings, self).__init__()
- self.disk_encryption_key = disk_encryption_key
- self.key_encryption_key = key_encryption_key
- self.enabled = enabled
+ 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/v2015_06_15/models/disk_encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings_py3.py
new file mode 100644
index 000000000000..a260d7468780
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_encryption_settings_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 DiskEncryptionSettings(Model):
+ """Describes a Encryption Settings for a Disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param disk_encryption_key: Required. Specifies the location of the disk
+ encryption key, which is a Key Vault Secret.
+ :type disk_encryption_key:
+ ~azure.mgmt.compute.v2015_06_15.models.KeyVaultSecretReference
+ :param key_encryption_key: Specifies the location of the key encryption
+ key in Key Vault.
+ :type key_encryption_key:
+ ~azure.mgmt.compute.v2015_06_15.models.KeyVaultKeyReference
+ :param enabled: Specifies whether disk encryption should be enabled on the
+ virtual machine.
+ :type enabled: bool
+ """
+
+ _validation = {
+ 'disk_encryption_key': {'required': True},
+ }
+
+ _attribute_map = {
+ 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'},
+ 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'},
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ }
+
+ def __init__(self, *, disk_encryption_key, key_encryption_key=None, enabled: bool=None, **kwargs) -> None:
+ super(DiskEncryptionSettings, self).__init__(**kwargs)
+ self.disk_encryption_key = disk_encryption_key
+ self.key_encryption_key = key_encryption_key
+ self.enabled = enabled
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view.py
index e6a9a0de6e8c..027d59e825e3 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view.py
@@ -27,7 +27,7 @@ class DiskInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, statuses=None):
- super(DiskInstanceView, self).__init__()
- self.name = name
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(DiskInstanceView, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view_py3.py
new file mode 100644
index 000000000000..cc4b78b3c2b3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/disk_instance_view_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 DiskInstanceView(Model):
+ """The instance view of the disk.
+
+ :param name: The disk name.
+ :type name: str
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None:
+ super(DiskInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile.py
index c95cd4dc83d6..7a999140c70a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile.py
@@ -47,6 +47,6 @@ class HardwareProfile(Model):
'vm_size': {'key': 'vmSize', 'type': 'str'},
}
- def __init__(self, vm_size=None):
- super(HardwareProfile, self).__init__()
- self.vm_size = vm_size
+ 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/v2015_06_15/models/hardware_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile_py3.py
new file mode 100644
index 000000000000..32cc5fac61eb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/hardware_profile_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 HardwareProfile(Model):
+ """Specifies the hardware settings for the virtual machine.
+
+ :param vm_size: Specifies the size of the virtual machine. For more
+ information about virtual machine sizes, see [Sizes for virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
The available VM sizes depend on region and availability set. For
+ a list of available sizes use these APIs:
[List all available
+ virtual machine sizes in an availability
+ set](virtualmachines-list-sizes-availability-set.md)
[List all
+ available virtual machine sizes in a
+ region](virtualmachines-list-sizes-region.md)
[List all available
+ virtual machine sizes for
+ resizing](virtualmachines-list-sizes-for-resizing.md). Possible values
+ include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4',
+ 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4',
+ 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9',
+ 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2',
+ 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12',
+ 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2',
+ 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2',
+ 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_DS1',
+ 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11',
+ 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_G1',
+ 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5',
+ 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4',
+ 'Standard_GS5'
+ :type vm_size: str or
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineSizeTypes
+ """
+
+ _attribute_map = {
+ 'vm_size': {'key': 'vmSize', 'type': 'str'},
+ }
+
+ def __init__(self, *, vm_size=None, **kwargs) -> None:
+ super(HardwareProfile, self).__init__(**kwargs)
+ self.vm_size = vm_size
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference.py
index 3aa6e4826ee8..d83cc00f394f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference.py
@@ -43,9 +43,9 @@ class ImageReference(Model):
'version': {'key': 'version', 'type': 'str'},
}
- def __init__(self, publisher=None, offer=None, sku=None, version=None):
- super(ImageReference, self).__init__()
- self.publisher = publisher
- self.offer = offer
- self.sku = sku
- self.version = version
+ 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/v2015_06_15/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference_py3.py
new file mode 100644
index 000000000000..ec4e3f91dee4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/image_reference_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 ImageReference(Model):
+ """Specifies information about the image to use. You can specify information
+ about platform images, marketplace images, or virtual machine images. This
+ element is required when you want to use a platform image, marketplace
+ image, or virtual machine image, but is not used in other creation
+ operations.
+
+ :param publisher: The image publisher.
+ :type publisher: str
+ :param offer: Specifies the offer of the platform image or marketplace
+ image used to create the virtual machine.
+ :type offer: str
+ :param sku: The image SKU.
+ :type sku: str
+ :param version: Specifies the version of the platform image or marketplace
+ image used to create the virtual machine. The allowed formats are
+ Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal
+ numbers. Specify 'latest' to use the latest version of an image available
+ at deploy time. Even if you use 'latest', the VM image will not
+ automatically update after deploy time even if a new version becomes
+ available.
+ :type version: str
+ """
+
+ _attribute_map = {
+ 'publisher': {'key': 'publisher', 'type': 'str'},
+ 'offer': {'key': 'offer', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'str'},
+ 'version': {'key': 'version', 'type': 'str'},
+ }
+
+ def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None:
+ super(ImageReference, self).__init__(**kwargs)
+ self.publisher = publisher
+ self.offer = offer
+ self.sku = sku
+ self.version = version
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error.py
index de77683e2fc8..6324249d7c19 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error.py
@@ -26,7 +26,7 @@ class InnerError(Model):
'errordetail': {'key': 'errordetail', 'type': 'str'},
}
- def __init__(self, exceptiontype=None, errordetail=None):
- super(InnerError, self).__init__()
- self.exceptiontype = exceptiontype
- self.errordetail = errordetail
+ 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/v2015_06_15/models/inner_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/inner_error_py3.py
new file mode 100644
index 000000000000..ccec30d7b53f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/instance_view_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status.py
index dc1e3e1ff33a..c1932d34ba85 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status.py
@@ -38,10 +38,10 @@ class InstanceViewStatus(Model):
'time': {'key': 'time', 'type': 'iso-8601'},
}
- def __init__(self, code=None, level=None, display_status=None, message=None, time=None):
- super(InstanceViewStatus, self).__init__()
- self.code = code
- self.level = level
- self.display_status = display_status
- self.message = message
- self.time = time
+ 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/v2015_06_15/models/instance_view_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/instance_view_status_py3.py
new file mode 100644
index 000000000000..cb721ac714cc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.StatusLevelTypes
+ :param display_status: The short localizable label for the status.
+ :type display_status: str
+ :param message: The detailed status message, including for alerts and
+ error messages.
+ :type message: str
+ :param time: The time of the status.
+ :type time: datetime
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'level': {'key': 'level', 'type': 'StatusLevelTypes'},
+ 'display_status': {'key': 'displayStatus', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'time': {'key': 'time', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None:
+ super(InstanceViewStatus, self).__init__(**kwargs)
+ self.code = code
+ self.level = level
+ self.display_status = display_status
+ self.message = message
+ self.time = time
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference.py
index 140432dae108..8d508c43671c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference.py
@@ -15,9 +15,13 @@
class KeyVaultKeyReference(Model):
"""Describes a reference to Key Vault Key.
- :param key_url: The URL referencing a key encryption key in Key Vault.
+ 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: The relative URL of the Key Vault containing the key.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the key.
:type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource
"""
@@ -31,7 +35,7 @@ class KeyVaultKeyReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, key_url, source_vault):
- super(KeyVaultKeyReference, self).__init__()
- self.key_url = key_url
- self.source_vault = source_vault
+ 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/v2015_06_15/models/key_vault_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference_py3.py
new file mode 100644
index 000000000000..630042c29596
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.SubResource
+ """
+
+ _validation = {
+ 'key_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key_url': {'key': 'keyUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, key_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultKeyReference, self).__init__(**kwargs)
+ self.key_url = key_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference.py
index eb6562ff39d2..ddd5ce2a668a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference.py
@@ -15,10 +15,12 @@
class KeyVaultSecretReference(Model):
"""Describes a reference to Key Vault Secret.
- :param secret_url: The URL referencing a secret in a Key Vault.
+ 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: The relative URL of the Key Vault containing the
- secret.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the secret.
:type source_vault: ~azure.mgmt.compute.v2015_06_15.models.SubResource
"""
@@ -32,7 +34,7 @@ class KeyVaultSecretReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, secret_url, source_vault):
- super(KeyVaultSecretReference, self).__init__()
- self.secret_url = secret_url
- self.source_vault = source_vault
+ 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/v2015_06_15/models/key_vault_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_secret_reference_py3.py
new file mode 100644
index 000000000000..517f66ed3180
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.SubResource
+ """
+
+ _validation = {
+ 'secret_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'secret_url': {'key': 'secretUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultSecretReference, self).__init__(**kwargs)
+ self.secret_url = secret_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration.py
index 1df4be677c27..562b1fbb78ce 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration.py
@@ -33,7 +33,7 @@ class LinuxConfiguration(Model):
'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
}
- def __init__(self, disable_password_authentication=None, ssh=None):
- super(LinuxConfiguration, self).__init__()
- self.disable_password_authentication = disable_password_authentication
- self.ssh = ssh
+ 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/v2015_06_15/models/linux_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/linux_configuration_py3.py
new file mode 100644
index 000000000000..bfc384d66e23
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.SshConfiguration
+ """
+
+ _attribute_map = {
+ 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'},
+ 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
+ }
+
+ def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None:
+ super(LinuxConfiguration, self).__init__(**kwargs)
+ self.disable_password_authentication = disable_password_authentication
+ self.ssh = ssh
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference.py
index 80c743c0d8e3..b86e305e3f74 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_interface_reference.py
@@ -27,6 +27,6 @@ class NetworkInterfaceReference(SubResource):
'primary': {'key': 'properties.primary', 'type': 'bool'},
}
- def __init__(self, id=None, primary=None):
- super(NetworkInterfaceReference, self).__init__(id=id)
- self.primary = primary
+ def __init__(self, **kwargs):
+ super(NetworkInterfaceReference, self).__init__(**kwargs)
+ self.primary = kwargs.get('primary', None)
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
new file mode 100644
index 000000000000..f42ead50fc36
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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 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/v2015_06_15/models/network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile.py
index ab13f8117e62..4ac8348e2f50 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile.py
@@ -25,6 +25,6 @@ class NetworkProfile(Model):
'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
}
- def __init__(self, network_interfaces=None):
- super(NetworkProfile, self).__init__()
- self.network_interfaces = network_interfaces
+ 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/v2015_06_15/models/network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/network_profile_py3.py
new file mode 100644
index 000000000000..83519262caa0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.NetworkInterfaceReference]
+ """
+
+ _attribute_map = {
+ 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
+ }
+
+ def __init__(self, *, network_interfaces=None, **kwargs) -> None:
+ super(NetworkProfile, self).__init__(**kwargs)
+ self.network_interfaces = network_interfaces
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response.py
index e3db2989d5b7..6d351d32b65a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response.py
@@ -46,8 +46,8 @@ class OperationStatusResponse(Model):
'error': {'key': 'error', 'type': 'ApiError'},
}
- def __init__(self):
- super(OperationStatusResponse, self).__init__()
+ def __init__(self, **kwargs):
+ super(OperationStatusResponse, self).__init__(**kwargs)
self.name = None
self.status = None
self.start_time = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response_py3.py
new file mode 100644
index 000000000000..3528bd0d9434
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/operation_status_response_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 OperationStatusResponse(Model):
+ """Operation status response.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: Operation ID
+ :vartype name: str
+ :ivar status: Operation status
+ :vartype status: str
+ :ivar start_time: Start time of the operation
+ :vartype start_time: datetime
+ :ivar end_time: End time of the operation
+ :vartype end_time: datetime
+ :ivar error: Api error
+ :vartype error: ~azure.mgmt.compute.v2015_06_15.models.ApiError
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'status': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'end_time': {'readonly': True},
+ 'error': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'end_time': {'key': 'endTime', 'type': 'iso-8601'},
+ 'error': {'key': 'error', 'type': 'ApiError'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(OperationStatusResponse, self).__init__(**kwargs)
+ self.name = None
+ self.status = None
+ self.start_time = None
+ self.end_time = None
+ self.error = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk.py
index f0c6e337d8ca..79b03a5188a7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk.py
@@ -18,6 +18,8 @@ class OSDisk(Model):
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**
@@ -28,9 +30,9 @@ class OSDisk(Model):
Disk.
Minimum api-version: 2015-06-15
:type encryption_settings:
~azure.mgmt.compute.v2015_06_15.models.DiskEncryptionSettings
- :param name: The disk name.
+ :param name: Required. The disk name.
:type name: str
- :param vhd: The virtual hard disk.
+ :param vhd: Required. The virtual hard disk.
:type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk
:param image: The source user image virtual hard disk. The virtual hard
disk will be copied before being attached to the virtual machine. If
@@ -42,8 +44,8 @@ class OSDisk(Model):
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -75,13 +77,13 @@ class OSDisk(Model):
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
}
- def __init__(self, name, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb=None):
- super(OSDisk, self).__init__()
- self.os_type = os_type
- self.encryption_settings = encryption_settings
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
+ def __init__(self, **kwargs):
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = kwargs.get('os_type', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image.py
index 161e8ca033e7..75d1d853bee4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image.py
@@ -15,8 +15,10 @@
class OSDiskImage(Model):
"""Contains the os disk image information.
- :param operating_system: The operating system of the osDiskImage. Possible
- values include: 'Windows', 'Linux'
+ All required parameters must be populated in order to send to Azure.
+
+ :param operating_system: Required. The operating system of the
+ osDiskImage. Possible values include: 'Windows', 'Linux'
:type operating_system: str or
~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes
"""
@@ -29,6 +31,6 @@ class OSDiskImage(Model):
'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
}
- def __init__(self, operating_system):
- super(OSDiskImage, self).__init__()
- self.operating_system = operating_system
+ 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/v2015_06_15/models/os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_image_py3.py
new file mode 100644
index 000000000000..8a13d6b47d8f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.OperatingSystemTypes
+ """
+
+ _validation = {
+ 'operating_system': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
+ }
+
+ def __init__(self, *, operating_system, **kwargs) -> None:
+ super(OSDiskImage, self).__init__(**kwargs)
+ self.operating_system = operating_system
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_py3.py
new file mode 100644
index 000000000000..2b5a1686e286
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_disk_py3.py
@@ -0,0 +1,89 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class OSDisk(Model):
+ """Specifies information about the operating system disk used by the virtual
+ machine.
For more information about disks, see [About disks and
+ VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes
+ :param encryption_settings: Specifies the encryption settings for the OS
+ Disk.
Minimum api-version: 2015-06-15
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2015_06_15.models.DiskEncryptionSettings
+ :param name: Required. The disk name.
+ :type name: str
+ :param vhd: Required. The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the name of the disk in a
+ virtual machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'vhd': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ }
+
+ def __init__(self, *, name: str, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None:
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = os_type
+ self.encryption_settings = encryption_settings
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile.py
index e55d67908a90..2b9a8853857c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile.py
@@ -88,12 +88,12 @@ class OSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(OSProfile, self).__init__()
- 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
+ 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/v2015_06_15/models/os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/os_profile_py3.py
new file mode 100644
index 000000000000..56fe8ba474dc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.WindowsConfiguration
+ :param linux_configuration: Specifies the Linux operating system settings
+ on the virtual machine.
For a list of supported Linux
+ distributions, see [Linux on Azure-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+
For running non-endorsed distributions, see [Information for
+ Non-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration
+ :param secrets: Specifies set of certificates that should be installed
+ onto the virtual machine.
+ :type secrets:
+ list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name': {'key': 'computerName', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(OSProfile, self).__init__(**kwargs)
+ self.computer_name = computer_name
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan.py
index 772160aef635..d42b6b32cfac 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan.py
@@ -38,9 +38,9 @@ class Plan(Model):
'promotion_code': {'key': 'promotionCode', 'type': 'str'},
}
- def __init__(self, name=None, publisher=None, product=None, promotion_code=None):
- super(Plan, self).__init__()
- self.name = name
- self.publisher = publisher
- self.product = product
- self.promotion_code = promotion_code
+ 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/v2015_06_15/models/plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/plan_py3.py
new file mode 100644
index 000000000000..9cca2c78a123
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/purchase_plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan.py
index aa29cb02ab78..2e1509addca6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan.py
@@ -16,12 +16,15 @@ class PurchasePlan(Model):
"""Used for establishing the purchase context of any 3rd Party artifact
through MarketPlace.
- :param publisher: The publisher ID.
+ All required parameters must be populated in order to send to Azure.
+
+ :param publisher: Required. The publisher ID.
:type publisher: str
- :param name: The plan ID.
+ :param name: Required. The plan ID.
:type name: str
- :param product: Specifies the product of the image from the marketplace.
- This is the same value as Offer under the imageReference element.
+ :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
"""
@@ -37,8 +40,8 @@ class PurchasePlan(Model):
'product': {'key': 'product', 'type': 'str'},
}
- def __init__(self, publisher, name, product):
- super(PurchasePlan, self).__init__()
- self.publisher = publisher
- self.name = name
- self.product = product
+ 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/v2015_06_15/models/purchase_plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/purchase_plan_py3.py
new file mode 100644
index 000000000000..26f7996f1633
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource.py
index 10269b591c68..5dd7d481c685 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource.py
@@ -18,13 +18,15 @@ class Resource(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -45,10 +47,10 @@ class Resource(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, location, tags=None):
- super(Resource, self).__init__()
+ def __init__(self, **kwargs):
+ super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
- self.location = location
- self.tags = tags
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/resource_py3.py
new file mode 100644
index 000000000000..2f3702caf609
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku.py
index 16755dc57b65..5c07709435e0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku.py
@@ -31,8 +31,8 @@ class Sku(Model):
'capacity': {'key': 'capacity', 'type': 'long'},
}
- def __init__(self, name=None, tier=None, capacity=None):
- super(Sku, self).__init__()
- self.name = name
- self.tier = tier
- self.capacity = capacity
+ 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/v2015_06_15/models/sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sku_py3.py
new file mode 100644
index 000000000000..f6bc74afaadc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/ssh_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration.py
index 52d4925d8051..10c604242030 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration.py
@@ -25,6 +25,6 @@ class SshConfiguration(Model):
'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
}
- def __init__(self, public_keys=None):
- super(SshConfiguration, self).__init__()
- self.public_keys = public_keys
+ 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/v2015_06_15/models/ssh_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_configuration_py3.py
new file mode 100644
index 000000000000..6781d53e3e3a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.SshPublicKey]
+ """
+
+ _attribute_map = {
+ 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
+ }
+
+ def __init__(self, *, public_keys=None, **kwargs) -> None:
+ super(SshConfiguration, self).__init__(**kwargs)
+ self.public_keys = public_keys
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key.py
index 2fe6756641cb..122e0d3b9fdd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key.py
@@ -33,7 +33,7 @@ class SshPublicKey(Model):
'key_data': {'key': 'keyData', 'type': 'str'},
}
- def __init__(self, path=None, key_data=None):
- super(SshPublicKey, self).__init__()
- self.path = path
- self.key_data = key_data
+ 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/v2015_06_15/models/ssh_public_key_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/ssh_public_key_py3.py
new file mode 100644
index 000000000000..b16ee085b36b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile.py
index 311c859e7a64..867bd965561e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile.py
@@ -40,8 +40,8 @@ class StorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
}
- def __init__(self, image_reference=None, os_disk=None, data_disks=None):
- super(StorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
- self.data_disks = data_disks
+ 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/v2015_06_15/models/storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/storage_profile_py3.py
new file mode 100644
index 000000000000..6fbf8335d47a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.ImageReference
+ :param os_disk: Specifies information about the operating system disk used
+ by the virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type os_disk: ~azure.mgmt.compute.v2015_06_15.models.OSDisk
+ :param data_disks: Specifies the parameters that are used to add a data
+ disk to a virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type data_disks: list[~azure.mgmt.compute.v2015_06_15.models.DataDisk]
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None:
+ super(StorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource.py
index b32875f54c8e..11e092cc6ff5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource.py
@@ -23,6 +23,6 @@ class SubResource(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(SubResource, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(SubResource, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/sub_resource_py3.py
new file mode 100644
index 000000000000..29e5afee38f9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy.py
index 046c8ed9414b..44f90ffe6ee6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy.py
@@ -28,6 +28,6 @@ class UpgradePolicy(Model):
'mode': {'key': 'mode', 'type': 'UpgradeMode'},
}
- def __init__(self, mode=None):
- super(UpgradePolicy, self).__init__()
- self.mode = mode
+ def __init__(self, **kwargs):
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = kwargs.get('mode', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy_py3.py
new file mode 100644
index 000000000000..c12f9aa7f3b1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/upgrade_policy_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 UpgradePolicy(Model):
+ """Describes an upgrade policy - automatic or manual.
+
+ :param mode: Specifies the mode of an upgrade to virtual machines in the
+ scale set.
Possible values are:
**Manual** - You
+ control the application of updates to virtual machines in the scale set.
+ You do this by using the manualUpgrade action.
**Automatic** -
+ All virtual machines in the scale set are automatically updated at the
+ same time. Possible values include: 'Automatic', 'Manual'
+ :type mode: str or ~azure.mgmt.compute.v2015_06_15.models.UpgradeMode
+ """
+
+ _attribute_map = {
+ 'mode': {'key': 'mode', 'type': 'UpgradeMode'},
+ }
+
+ def __init__(self, *, mode=None, **kwargs) -> None:
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = mode
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage.py
index 00f3be0d2b58..01ed97fc4de6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage.py
@@ -18,14 +18,16 @@ class Usage(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
- :ivar unit: An enum describing the unit of usage measurement. Default
- value: "Count" .
+ 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: The current usage of the resource.
+ :param current_value: Required. The current usage of the resource.
:type current_value: int
- :param limit: The maximum permitted usage of the resource.
+ :param limit: Required. The maximum permitted usage of the resource.
:type limit: long
- :param name: The name of the type of usage.
+ :param name: Required. The name of the type of usage.
:type name: ~azure.mgmt.compute.v2015_06_15.models.UsageName
"""
@@ -45,8 +47,8 @@ class Usage(Model):
unit = "Count"
- def __init__(self, current_value, limit, name):
- super(Usage, self).__init__()
- self.current_value = current_value
- self.limit = limit
- self.name = name
+ 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/v2015_06_15/models/usage_name.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name.py
index 799c1f896da3..e2560936493e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name.py
@@ -26,7 +26,7 @@ class UsageName(Model):
'localized_value': {'key': 'localizedValue', 'type': 'str'},
}
- def __init__(self, value=None, localized_value=None):
- super(UsageName, self).__init__()
- self.value = value
- self.localized_value = localized_value
+ 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/v2015_06_15/models/usage_name_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_name_py3.py
new file mode 100644
index 000000000000..ad0b77459f75
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/usage_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/usage_py3.py
new file mode 100644
index 000000000000..73b319c36b9d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.UsageName
+ """
+
+ _validation = {
+ 'unit': {'required': True, 'constant': True},
+ 'current_value': {'required': True},
+ 'limit': {'required': True},
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'unit': {'key': 'unit', 'type': 'str'},
+ 'current_value': {'key': 'currentValue', 'type': 'int'},
+ 'limit': {'key': 'limit', 'type': 'long'},
+ 'name': {'key': 'name', 'type': 'UsageName'},
+ }
+
+ unit = "Count"
+
+ def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None:
+ super(Usage, self).__init__(**kwargs)
+ self.current_value = current_value
+ self.limit = limit
+ self.name = name
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate.py
index 8d4d05955de4..b173def6f820 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate.py
@@ -40,7 +40,7 @@ class VaultCertificate(Model):
'certificate_store': {'key': 'certificateStore', 'type': 'str'},
}
- def __init__(self, certificate_url=None, certificate_store=None):
- super(VaultCertificate, self).__init__()
- self.certificate_url = certificate_url
- self.certificate_store = certificate_store
+ 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/v2015_06_15/models/vault_certificate_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_certificate_py3.py
new file mode 100644
index 000000000000..eda5ba1c3f1d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/vault_secret_group.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group.py
index 5ebb98d43c3b..404557b15d2a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group.py
@@ -29,7 +29,7 @@ class VaultSecretGroup(Model):
'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
}
- def __init__(self, source_vault=None, vault_certificates=None):
- super(VaultSecretGroup, self).__init__()
- self.source_vault = source_vault
- self.vault_certificates = vault_certificates
+ 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/v2015_06_15/models/vault_secret_group_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/vault_secret_group_py3.py
new file mode 100644
index 000000000000..f9b4e9def34d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.SubResource
+ :param vault_certificates: The list of key vault references in SourceVault
+ which contain certificates.
+ :type vault_certificates:
+ list[~azure.mgmt.compute.v2015_06_15.models.VaultCertificate]
+ """
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
+ }
+
+ def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None:
+ super(VaultSecretGroup, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.vault_certificates = vault_certificates
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk.py
index af1725d302af..5e3ad9dea7d4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk.py
@@ -23,6 +23,6 @@ class VirtualHardDisk(Model):
'uri': {'key': 'uri', 'type': 'str'},
}
- def __init__(self, uri=None):
- super(VirtualHardDisk, self).__init__()
- self.uri = uri
+ def __init__(self, **kwargs):
+ super(VirtualHardDisk, self).__init__(**kwargs)
+ self.uri = kwargs.get('uri', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_hard_disk_py3.py
new file mode 100644
index 000000000000..9c069b95f084
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/virtual_machine.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine.py
index d3d91e3cdeda..3c96a569b5ff 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine.py
@@ -18,13 +18,15 @@ class VirtualMachine(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -117,16 +119,16 @@ class VirtualMachine(Resource):
'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
}
- def __init__(self, location, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type=None):
- super(VirtualMachine, self).__init__(location=location, tags=tags)
- 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
+ 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 = license_type
+ self.license_type = kwargs.get('license_type', None)
self.resources = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view.py
index f79a79e0c7fa..2354a65bf52b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view.py
@@ -32,8 +32,8 @@ class VirtualMachineAgentInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, vm_agent_version=None, extension_handlers=None, statuses=None):
- super(VirtualMachineAgentInstanceView, self).__init__()
- self.vm_agent_version = vm_agent_version
- self.extension_handlers = extension_handlers
- self.statuses = statuses
+ 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/v2015_06_15/models/virtual_machine_agent_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_agent_instance_view_py3.py
new file mode 100644
index 000000000000..26483dd9ebbb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.VirtualMachineExtensionHandlerInstanceView]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'},
+ 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineAgentInstanceView, self).__init__(**kwargs)
+ self.vm_agent_version = vm_agent_version
+ self.extension_handlers = extension_handlers
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters.py
index b406f387ffed..4e6ffbea7a4f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters.py
@@ -15,12 +15,15 @@
class VirtualMachineCaptureParameters(Model):
"""Capture Virtual Machine parameters.
- :param vhd_prefix: The captured virtual hard disk's name prefix.
+ 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: The destination container name.
+ :param destination_container_name: Required. The destination container
+ name.
:type destination_container_name: str
- :param overwrite_vhds: Specifies whether to overwrite the destination
- virtual hard disk, in case of conflict.
+ :param overwrite_vhds: Required. Specifies whether to overwrite the
+ destination virtual hard disk, in case of conflict.
:type overwrite_vhds: bool
"""
@@ -36,8 +39,8 @@ class VirtualMachineCaptureParameters(Model):
'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'},
}
- def __init__(self, vhd_prefix, destination_container_name, overwrite_vhds):
- super(VirtualMachineCaptureParameters, self).__init__()
- self.vhd_prefix = vhd_prefix
- self.destination_container_name = destination_container_name
- self.overwrite_vhds = overwrite_vhds
+ 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/v2015_06_15/models/virtual_machine_capture_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_parameters_py3.py
new file mode 100644
index 000000000000..1866cdc23300
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/virtual_machine_capture_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result.py
index 95e26a427e83..2b0df7406a34 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result.py
@@ -26,6 +26,6 @@ class VirtualMachineCaptureResult(SubResource):
'output': {'key': 'properties.output', 'type': 'object'},
}
- def __init__(self, id=None, output=None):
- super(VirtualMachineCaptureResult, self).__init__(id=id)
- self.output = output
+ def __init__(self, **kwargs):
+ super(VirtualMachineCaptureResult, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
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
new file mode 100644
index 000000000000..da449b8e9154
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_capture_result_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 .sub_resource import SubResource
+
+
+class VirtualMachineCaptureResult(SubResource):
+ """Resource Id.
+
+ :param id: Resource Id
+ :type id: str
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'output': {'key': 'properties.output', 'type': 'object'},
+ }
+
+ def __init__(self, *, id: str=None, output=None, **kwargs) -> None:
+ super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension.py
index 232d17f3227d..f8518c889105 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension.py
@@ -18,13 +18,15 @@ class VirtualMachineExtension(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -82,14 +84,14 @@ class VirtualMachineExtension(Resource):
'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
}
- def __init__(self, location, tags=None, force_update_tag=None, publisher=None, virtual_machine_extension_type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None, instance_view=None):
- super(VirtualMachineExtension, self).__init__(location=location, tags=tags)
- 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
+ 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 = instance_view
+ self.instance_view = kwargs.get('instance_view', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view.py
index 988d7df8141b..68fc656cac2f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view.py
@@ -30,8 +30,8 @@ class VirtualMachineExtensionHandlerInstanceView(Model):
'status': {'key': 'status', 'type': 'InstanceViewStatus'},
}
- def __init__(self, type=None, type_handler_version=None, status=None):
- super(VirtualMachineExtensionHandlerInstanceView, self).__init__()
- self.type = type
- self.type_handler_version = type_handler_version
- self.status = status
+ 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/v2015_06_15/models/virtual_machine_extension_handler_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_handler_instance_view_py3.py
new file mode 100644
index 000000000000..2b6383f78fcc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.InstanceViewStatus
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'InstanceViewStatus'},
+ }
+
+ def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None:
+ super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs)
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.status = status
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image.py
index 7614699a78da..7273e2b84754 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_image.py
@@ -18,23 +18,26 @@ class VirtualMachineExtensionImage(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
- :param operating_system: The operating system this extension supports.
- :type operating_system: str
- :param compute_role: The type of role (IaaS or PaaS) this extension
+ :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: The schema defined by publisher, where extension
- consumers should provide settings in a matching schema.
+ :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
@@ -69,10 +72,10 @@ class VirtualMachineExtensionImage(Resource):
'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'},
}
- def __init__(self, location, operating_system, compute_role, handler_schema, tags=None, vm_scale_set_enabled=None, supports_multiple_extensions=None):
- super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags)
- 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
+ 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/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
new file mode 100644
index 000000000000..217accab02f0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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 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/v2015_06_15/models/virtual_machine_extension_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view.py
index 16515cbfe606..aa4725b23c88 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view.py
@@ -38,10 +38,10 @@ class VirtualMachineExtensionInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, type=None, type_handler_version=None, substatuses=None, statuses=None):
- super(VirtualMachineExtensionInstanceView, self).__init__()
- self.name = name
- self.type = type
- self.type_handler_version = type_handler_version
- self.substatuses = substatuses
- self.statuses = statuses
+ 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/v2015_06_15/models/virtual_machine_extension_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_instance_view_py3.py
new file mode 100644
index 000000000000..2b6ecac3802c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.InstanceViewStatus]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.substatuses = substatuses
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..a3bbe0510df7
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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 import Resource
+
+
+class VirtualMachineExtension(Resource):
+ """Describes a Virtual Machine Extension.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param force_update_tag: How the extension handler should be forced to
+ update even if the extension configuration has not changed.
+ :type force_update_tag: str
+ :param publisher: The name of the extension handler publisher.
+ :type publisher: str
+ :param virtual_machine_extension_type: Specifies the type of the
+ extension; an example is "CustomScriptExtension".
+ :type virtual_machine_extension_type: str
+ :param type_handler_version: Specifies the version of the script handler.
+ :type type_handler_version: str
+ :param auto_upgrade_minor_version: Indicates whether the extension should
+ use a newer minor version if one is available at deployment time. Once
+ deployed, however, the extension will not upgrade minor versions unless
+ redeployed, even with this property set to true.
+ :type auto_upgrade_minor_version: bool
+ :param settings: Json formatted public settings for the extension.
+ :type settings: object
+ :param protected_settings: The extension can contain either
+ protectedSettings or protectedSettingsFromKeyVault or no protected
+ settings at all.
+ :type protected_settings: object
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param instance_view: The virtual machine extension instance view.
+ :type instance_view:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
+ 'publisher': {'key': 'properties.publisher', 'type': 'str'},
+ 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'},
+ 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'},
+ 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'},
+ 'settings': {'key': 'properties.settings', 'type': 'object'},
+ 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
+ }
+
+ def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None:
+ super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs)
+ self.force_update_tag = force_update_tag
+ self.publisher = publisher
+ self.virtual_machine_extension_type = virtual_machine_extension_type
+ self.type_handler_version = type_handler_version
+ self.auto_upgrade_minor_version = auto_upgrade_minor_version
+ self.settings = settings
+ self.protected_settings = protected_settings
+ self.provisioning_state = None
+ self.instance_view = instance_view
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image.py
index 730e1852db5b..5c1873173b95 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -50,8 +52,8 @@ class VirtualMachineImage(VirtualMachineImageResource):
'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
}
- def __init__(self, name, location, id=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None):
- super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags)
- self.plan = plan
- self.os_disk_image = os_disk_image
- self.data_disk_images = data_disk_images
+ 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/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
new file mode 100644
index 000000000000..fb55ba3fa039
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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 import VirtualMachineImageResource
+
+
+class VirtualMachineImage(VirtualMachineImageResource):
+ """Describes a Virtual Machine Image.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The name of the resource.
+ :type name: str
+ :param location: Required. The supported Azure location of the resource.
+ :type location: str
+ :param tags: Specifies the tags that are assigned to the virtual machine.
+ For more information about using tags, see [Using tags to organize your
+ Azure
+ resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
+ :type tags: dict[str, str]
+ :param plan:
+ :type plan: ~azure.mgmt.compute.v2015_06_15.models.PurchasePlan
+ :param os_disk_image:
+ :type os_disk_image: ~azure.mgmt.compute.v2015_06_15.models.OSDiskImage
+ :param data_disk_images:
+ :type data_disk_images:
+ list[~azure.mgmt.compute.v2015_06_15.models.DataDiskImage]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'},
+ 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'},
+ 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
+ }
+
+ def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None:
+ super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs)
+ self.plan = plan
+ self.os_disk_image = os_disk_image
+ self.data_disk_images = data_disk_images
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource.py
index a7029041061d..8807cc8f391b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_image_resource.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -40,8 +42,8 @@ class VirtualMachineImageResource(SubResource):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, name, location, id=None, tags=None):
- super(VirtualMachineImageResource, self).__init__(id=id)
- self.name = name
- self.location = location
- self.tags = tags
+ 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/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
new file mode 100644
index 000000000000..48a968bf2fbf
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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 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/v2015_06_15/models/virtual_machine_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view.py
index 4e729b2bc401..088d69be6a30 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view.py
@@ -54,13 +54,13 @@ class VirtualMachineInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None):
- super(VirtualMachineInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.disks = disks
- self.extensions = extensions
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
+ self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view_py3.py
new file mode 100644
index 000000000000..0583e610ceeb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_instance_view_py3.py
@@ -0,0 +1,66 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineInstanceView(Model):
+ """The instance view of a virtual machine.
+
+ :param platform_update_domain: Specifies the update domain of the virtual
+ machine.
+ :type platform_update_domain: int
+ :param platform_fault_domain: Specifies the fault domain of the virtual
+ machine.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView
+ :param disks: The virtual machine disk information.
+ :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView]
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2015_06_15.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.disks = disks
+ self.extensions = extensions
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..6691e50e4b9e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_py3.py
@@ -0,0 +1,134 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class VirtualMachine(Resource):
+ """Describes a Virtual Machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2015_06_15.models.SubResource
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineInstanceView
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'plan', 'type': 'Plan'},
+ 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'},
+ 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'},
+ 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'},
+ 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'},
+ 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'},
+ 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'},
+ 'license_type': {'key': 'properties.licenseType', 'type': 'str'},
+ 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
+ }
+
+ def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, **kwargs) -> None:
+ super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs)
+ self.plan = plan
+ self.hardware_profile = hardware_profile
+ self.storage_profile = storage_profile
+ self.os_profile = os_profile
+ self.network_profile = network_profile
+ self.diagnostics_profile = diagnostics_profile
+ self.availability_set = availability_set
+ self.provisioning_state = None
+ self.instance_view = None
+ self.license_type = license_type
+ self.resources = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set.py
index 2b7ae564062b..5f4d8d0f7ee4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -63,10 +65,10 @@ class VirtualMachineScaleSet(Resource):
'over_provision': {'key': 'properties.overProvision', 'type': 'bool'},
}
- def __init__(self, location, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, provisioning_state=None, over_provision=None):
- super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags)
- self.sku = sku
- self.upgrade_policy = upgrade_policy
- self.virtual_machine_profile = virtual_machine_profile
- self.provisioning_state = provisioning_state
- self.over_provision = over_provision
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSet, self).__init__(**kwargs)
+ self.sku = kwargs.get('sku', None)
+ self.upgrade_policy = kwargs.get('upgrade_policy', None)
+ self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None)
+ self.provisioning_state = kwargs.get('provisioning_state', None)
+ self.over_provision = kwargs.get('over_provision', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension.py
index 2c7514755033..d6d8b5fbc51e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension.py
@@ -57,13 +57,13 @@ class VirtualMachineScaleSetExtension(SubResource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, id=None, name=None, publisher=None, type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None):
- super(VirtualMachineScaleSetExtension, self).__init__(id=id)
- self.name = name
- self.publisher = publisher
- self.type = type
- self.type_handler_version = type_handler_version
- self.auto_upgrade_minor_version = auto_upgrade_minor_version
- self.settings = settings
- self.protected_settings = protected_settings
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetExtension, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.publisher = kwargs.get('publisher', None)
+ self.type = kwargs.get('type', None)
+ self.type_handler_version = kwargs.get('type_handler_version', None)
+ self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None)
+ self.settings = kwargs.get('settings', None)
+ self.protected_settings = kwargs.get('protected_settings', None)
self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile.py
index 85c4dba06e22..a231db28e10a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetExtensionProfile(Model):
'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
}
- def __init__(self, extensions=None):
- super(VirtualMachineScaleSetExtensionProfile, self).__init__()
- self.extensions = extensions
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = kwargs.get('extensions', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_profile_py3.py
new file mode 100644
index 000000000000..514556c9d425
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.VirtualMachineScaleSetExtension]
+ """
+
+ _attribute_map = {
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
+ }
+
+ def __init__(self, *, extensions=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = extensions
diff --git a/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
new file mode 100644
index 000000000000..5523e0444c59
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_extension_py3.py
@@ -0,0 +1,69 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .sub_resource import SubResource
+
+
+class VirtualMachineScaleSetExtension(SubResource):
+ """Describes a Virtual Machine Scale Set Extension.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: The name of the extension.
+ :type name: str
+ :param publisher: The name of the extension handler publisher.
+ :type publisher: str
+ :param type: The type of the extension handler.
+ :type type: str
+ :param type_handler_version: The type version of the extension handler.
+ :type type_handler_version: str
+ :param auto_upgrade_minor_version: Whether the extension handler should be
+ automatically upgraded across minor versions.
+ :type auto_upgrade_minor_version: bool
+ :param settings: Json formatted public settings for the extension.
+ :type settings: object
+ :param protected_settings: Json formatted protected settings for the
+ extension.
+ :type protected_settings: object
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'publisher': {'key': 'properties.publisher', 'type': 'str'},
+ 'type': {'key': 'properties.type', 'type': 'str'},
+ 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'},
+ 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'},
+ 'settings': {'key': 'properties.settings', 'type': 'object'},
+ 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, id: str=None, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetExtension, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.publisher = publisher
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.auto_upgrade_minor_version = auto_upgrade_minor_version
+ self.settings = settings
+ self.protected_settings = protected_settings
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view.py
index 75adcc7ed4d5..6facbd710730 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view.py
@@ -41,8 +41,8 @@ class VirtualMachineScaleSetInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, statuses=None):
- super(VirtualMachineScaleSetInstanceView, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
self.virtual_machine = None
self.extensions = None
- self.statuses = statuses
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_py3.py
new file mode 100644
index 000000000000..61e39b4ea912
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.VirtualMachineScaleSetInstanceViewStatusesSummary
+ :ivar extensions: The extensions information.
+ :vartype extensions:
+ list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMExtensionsSummary]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus]
+ """
+
+ _validation = {
+ 'virtual_machine': {'readonly': True},
+ 'extensions': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, statuses=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
+ self.virtual_machine = None
+ self.extensions = None
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary.py
index 7df6072db24b..7654505381d7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary.py
@@ -32,6 +32,6 @@ class VirtualMachineScaleSetInstanceViewStatusesSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py
new file mode 100644
index 000000000000..aa1958c81a66
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration.py
index 9b97390716c1..0461dad30d7f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_configuration.py
@@ -15,11 +15,13 @@
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: The IP configuration name.
+ :param name: Required. The IP configuration name.
:type name: str
- :param subnet: The subnet.
+ :param subnet: Required. The subnet.
:type subnet: ~azure.mgmt.compute.v2015_06_15.models.ApiEntityReference
:param load_balancer_backend_address_pools: The load balancer backend
address pools.
@@ -44,9 +46,9 @@ class VirtualMachineScaleSetIPConfiguration(SubResource):
'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
}
- def __init__(self, name, subnet, id=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None):
- super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id)
- self.name = name
- self.subnet = subnet
- self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
- self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.subnet = kwargs.get('subnet', None)
+ self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None)
+ self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None)
diff --git a/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
new file mode 100644
index 000000000000..e075f019a729
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_ip_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 .sub_resource import SubResource
+
+
+class VirtualMachineScaleSetIPConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's IP configuration.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The IP configuration name.
+ :type name: str
+ :param subnet: Required. The subnet.
+ :type subnet: ~azure.mgmt.compute.v2015_06_15.models.ApiEntityReference
+ :param load_balancer_backend_address_pools: The load balancer backend
+ address pools.
+ :type load_balancer_backend_address_pools:
+ list[~azure.mgmt.compute.v2015_06_15.models.SubResource]
+ :param load_balancer_inbound_nat_pools: The load balancer inbound nat
+ pools.
+ :type load_balancer_inbound_nat_pools:
+ list[~azure.mgmt.compute.v2015_06_15.models.SubResource]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'subnet': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'},
+ 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
+ }
+
+ def __init__(self, *, name: str, subnet, id: str=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.subnet = subnet
+ self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
+ self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration.py
index 8fd468924e6f..ee5c117f24b2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration.py
@@ -16,13 +16,16 @@ 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: The network configuration name.
+ :param name: Required. The network configuration name.
:type name: str
:param primary: Whether this is a primary NIC on a virtual machine.
:type primary: bool
- :param ip_configurations: The virtual machine scale set IP Configuration.
+ :param ip_configurations: Required. The virtual machine scale set IP
+ Configuration.
:type ip_configurations:
list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetIPConfiguration]
"""
@@ -39,8 +42,8 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource):
'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
}
- def __init__(self, name, ip_configurations, id=None, primary=None):
- super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id)
- self.name = name
- self.primary = primary
- self.ip_configurations = ip_configurations
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.primary = kwargs.get('primary', None)
+ self.ip_configurations = kwargs.get('ip_configurations', None)
diff --git a/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
new file mode 100644
index 000000000000..77933661de7f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_configuration_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 import SubResource
+
+
+class VirtualMachineScaleSetNetworkConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's network
+ configurations.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The network configuration name.
+ :type name: str
+ :param primary: Whether this is a primary NIC on a virtual machine.
+ :type primary: bool
+ :param ip_configurations: Required. The virtual machine scale set IP
+ Configuration.
+ :type ip_configurations:
+ list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetIPConfiguration]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'ip_configurations': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'primary': {'key': 'properties.primary', 'type': 'bool'},
+ 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
+ }
+
+ def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.primary = primary
+ self.ip_configurations = ip_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile.py
index cc7f5ae4fec8..e710af393b0c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetNetworkProfile(Model):
'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
}
- def __init__(self, network_interface_configurations=None):
- super(VirtualMachineScaleSetNetworkProfile, self).__init__()
- self.network_interface_configurations = network_interface_configurations
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs)
+ self.network_interface_configurations = kwargs.get('network_interface_configurations', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_network_profile_py3.py
new file mode 100644
index 000000000000..b0b43ccb35d6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_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 VirtualMachineScaleSetNetworkProfile(Model):
+ """Describes a virtual machine scale set network profile.
+
+ :param network_interface_configurations: The list of network
+ configurations.
+ :type network_interface_configurations:
+ list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkConfiguration]
+ """
+
+ _attribute_map = {
+ 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
+ }
+
+ def __init__(self, *, network_interface_configurations=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs)
+ self.network_interface_configurations = network_interface_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk.py
index b9b1e1cef809..779a5b58bb71 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk.py
@@ -15,20 +15,22 @@
class VirtualMachineScaleSetOSDisk(Model):
"""Describes a virtual machine scale set operating system disk.
- :param name: The disk name.
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. The disk name.
:type name: str
:param caching: Specifies the caching requirements.
Possible
values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes
- :param create_option: 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'
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes
:param os_type: This property allows you to specify the type of the OS
@@ -59,11 +61,11 @@ class VirtualMachineScaleSetOSDisk(Model):
'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
}
- def __init__(self, name, create_option, caching=None, os_type=None, image=None, vhd_containers=None):
- super(VirtualMachineScaleSetOSDisk, self).__init__()
- self.name = name
- self.caching = caching
- self.create_option = create_option
- self.os_type = os_type
- self.image = image
- self.vhd_containers = vhd_containers
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.os_type = kwargs.get('os_type', None)
+ self.image = kwargs.get('image', None)
+ self.vhd_containers = kwargs.get('vhd_containers', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk_py3.py
new file mode 100644
index 000000000000..2a4f5f962911
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_disk_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 msrest.serialization import Model
+
+
+class VirtualMachineScaleSetOSDisk(Model):
+ """Describes a virtual machine scale set operating system disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. The disk name.
+ :type name: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2015_06_15.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2015_06_15.models.DiskCreateOptionTypes
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2015_06_15.models.OperatingSystemTypes
+ :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk
+ will be copied before using it to attach to the Virtual Machine. If
+ SourceImage is provided, the destination VirtualHardDisk should not exist.
+ :type image: ~azure.mgmt.compute.v2015_06_15.models.VirtualHardDisk
+ :param vhd_containers: The list of virtual hard disk container uris.
+ :type vhd_containers: list[str]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
+ }
+
+ def __init__(self, *, name: str, create_option, caching=None, os_type=None, image=None, vhd_containers=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = name
+ self.caching = caching
+ self.create_option = create_option
+ self.os_type = os_type
+ self.image = image
+ self.vhd_containers = vhd_containers
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile.py
index ecfff50f42ef..3de628b7b60c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile.py
@@ -73,12 +73,12 @@ class VirtualMachineScaleSetOSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name_prefix=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(VirtualMachineScaleSetOSProfile, self).__init__()
- 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
+ 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/v2015_06_15/models/virtual_machine_scale_set_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile_py3.py
new file mode 100644
index 000000000000..e28f4c4ac123
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_os_profile_py3.py
@@ -0,0 +1,84 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetOSProfile(Model):
+ """Describes a virtual machine scale set OS profile.
+
+ :param computer_name_prefix: Specifies the computer name prefix for all of
+ the virtual machines in the scale set. Computer name prefixes must be 1 to
+ 15 characters long.
+ :type computer_name_prefix: str
+ :param admin_username: Specifies the name of the administrator account.
+
**Windows-only restriction:** Cannot end in "."
+ **Disallowed values:** "administrator", "admin", "user", "user1", "test",
+ "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm",
+ "admin2", "aspnet", "backup", "console", "david", "guest", "john",
+ "owner", "root", "server", "sql", "support", "support_388945a0", "sys",
+ "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1
+ character
**Max-length (Linux):** 64 characters
+ **Max-length (Windows):** 20 characters
For root access to
+ the Linux VM, see [Using root privileges on Linux virtual machines in
+ Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ For a list of built-in system users on Linux that should not be used in
+ this field, see [Selecting User Names for Linux on
+ Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ :type admin_username: str
+ :param admin_password: Specifies the password of the administrator
+ account.
**Minimum-length (Windows):** 8 characters
+ **Minimum-length (Linux):** 6 characters
**Max-length
+ (Windows):** 123 characters
**Max-length (Linux):** 72 characters
+
**Complexity requirements:** 3 out of 4 conditions below need to
+ be fulfilled
Has lower characters
Has upper characters
Has a
+ digit
Has a special character (Regex match [\\W_])
+ **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123",
+ "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
+ "iloveyou!"
For resetting the password, see [How to reset the
+ Remote Desktop service or its login password in a Windows
+ VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
For resetting root password, see [Manage users, SSH, and check or
+ repair disks on Azure Linux VMs using the VMAccess
+ Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
+ :type admin_password: str
+ :param custom_data: A base-64 encoded string of custom data.
+ :type custom_data: str
+ :param windows_configuration: The Windows Configuration of the OS profile.
+ :type windows_configuration:
+ ~azure.mgmt.compute.v2015_06_15.models.WindowsConfiguration
+ :param linux_configuration: The Linux Configuration of the OS profile.
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2015_06_15.models.LinuxConfiguration
+ :param secrets: The List of certificates for addition to the VM.
+ :type secrets:
+ list[~azure.mgmt.compute.v2015_06_15.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs)
+ self.computer_name_prefix = computer_name_prefix
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/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
new file mode 100644
index 000000000000..7ef6ab297883
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_py3.py
@@ -0,0 +1,74 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class VirtualMachineScaleSet(Resource):
+ """Describes a Virtual Machine Scale Set.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku: The virtual machine scale set sku.
+ :type sku: ~azure.mgmt.compute.v2015_06_15.models.Sku
+ :param upgrade_policy: The upgrade policy.
+ :type upgrade_policy: ~azure.mgmt.compute.v2015_06_15.models.UpgradePolicy
+ :param virtual_machine_profile: The virtual machine profile.
+ :type virtual_machine_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMProfile
+ :param provisioning_state: The provisioning state, which only appears in
+ the response.
+ :type provisioning_state: str
+ :param over_provision: Specifies whether the Virtual Machine Scale Set
+ should be overprovisioned.
+ :type over_provision: bool
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'},
+ 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'},
+ }
+
+ def __init__(self, *, location: str, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, provisioning_state: str=None, over_provision: bool=None, **kwargs) -> None:
+ super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs)
+ self.sku = sku
+ self.upgrade_policy = upgrade_policy
+ self.virtual_machine_profile = virtual_machine_profile
+ self.provisioning_state = provisioning_state
+ self.over_provision = over_provision
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku.py
index 8b49e623b94a..f5f8c8b87bcc 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku.py
@@ -39,8 +39,8 @@ class VirtualMachineScaleSetSku(Model):
'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSku, self).__init__()
+ 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/v2015_06_15/models/virtual_machine_scale_set_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity.py
index 5b558b796465..0b15c77b345f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity.py
@@ -44,8 +44,8 @@ class VirtualMachineScaleSetSkuCapacity(Model):
'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSkuCapacity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
self.minimum = None
self.maximum = None
self.default_capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_capacity_py3.py
new file mode 100644
index 000000000000..10eb53309d29
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.VirtualMachineScaleSetSkuScaleType
+ """
+
+ _validation = {
+ 'minimum': {'readonly': True},
+ 'maximum': {'readonly': True},
+ 'default_capacity': {'readonly': True},
+ 'scale_type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'minimum': {'key': 'minimum', 'type': 'long'},
+ 'maximum': {'key': 'maximum', 'type': 'long'},
+ 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'},
+ 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
+ self.minimum = None
+ self.maximum = None
+ self.default_capacity = None
+ self.scale_type = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_sku_py3.py
new file mode 100644
index 000000000000..f8986ba6206a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.Sku
+ :ivar capacity: Specifies the number of virtual machines in the scale set.
+ :vartype capacity:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetSkuCapacity
+ """
+
+ _validation = {
+ 'resource_type': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'capacity': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSku, self).__init__(**kwargs)
+ self.resource_type = None
+ self.sku = None
+ self.capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile.py
index bbb787e77d1e..d4f6bb3e25fb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile.py
@@ -28,7 +28,7 @@ class VirtualMachineScaleSetStorageProfile(Model):
'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'},
}
- def __init__(self, image_reference=None, os_disk=None):
- super(VirtualMachineScaleSetStorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs)
+ self.image_reference = kwargs.get('image_reference', None)
+ self.os_disk = kwargs.get('os_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_profile_py3.py
new file mode 100644
index 000000000000..f330b1168857
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_storage_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 VirtualMachineScaleSetStorageProfile(Model):
+ """Describes a virtual machine scale set storage profile.
+
+ :param image_reference: The image reference.
+ :type image_reference:
+ ~azure.mgmt.compute.v2015_06_15.models.ImageReference
+ :param os_disk: The OS disk.
+ :type os_disk:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSDisk
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm.py
index 342e165595d1..e6022b62cddf 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSetVM(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -129,19 +131,19 @@ class VirtualMachineScaleSetVM(Resource):
'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
}
- def __init__(self, location, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, provisioning_state=None, license_type=None, plan=None):
- super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags)
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVM, self).__init__(**kwargs)
self.instance_id = None
self.sku = None
self.latest_model_applied = None
self.instance_view = None
- self.hardware_profile = hardware_profile
- self.storage_profile = storage_profile
- self.os_profile = os_profile
- self.network_profile = network_profile
- self.diagnostics_profile = diagnostics_profile
- self.availability_set = availability_set
- self.provisioning_state = provisioning_state
- self.license_type = license_type
- self.plan = plan
+ self.hardware_profile = kwargs.get('hardware_profile', None)
+ self.storage_profile = kwargs.get('storage_profile', None)
+ self.os_profile = kwargs.get('os_profile', None)
+ self.network_profile = kwargs.get('network_profile', None)
+ self.diagnostics_profile = kwargs.get('diagnostics_profile', None)
+ self.availability_set = kwargs.get('availability_set', None)
+ self.provisioning_state = kwargs.get('provisioning_state', None)
+ self.license_type = kwargs.get('license_type', None)
+ self.plan = kwargs.get('plan', None)
self.resources = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary.py
index 4bbdf2346de2..9da38fee498a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary.py
@@ -35,7 +35,7 @@ class VirtualMachineScaleSetVMExtensionsSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__()
+ 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/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_extensions_summary_py3.py
new file mode 100644
index 000000000000..594a1fc6940d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs)
+ self.name = None
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids.py
index 681ab449f3f2..772c66dad326 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetVMInstanceIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids=None):
- super(VirtualMachineScaleSetVMInstanceIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2015_06_15/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/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/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids.py
index 2a35798001fa..ece250dd4fd4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids.py
@@ -15,7 +15,9 @@
class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
"""Specifies a list of virtual machine instance IDs from the VM scale set.
- :param instance_ids: The virtual machine scale set instance ids.
+ 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]
"""
@@ -27,6 +29,6 @@ class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids):
- super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2015_06_15/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/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/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view.py
index f64aa7136d24..f94d635b5955 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view.py
@@ -52,13 +52,13 @@ class VirtualMachineScaleSetVMInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None):
- super(VirtualMachineScaleSetVMInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.disks = disks
- self.extensions = extensions
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
+ self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view_py3.py
new file mode 100644
index 000000000000..f7c9071903cf
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_instance_view_py3.py
@@ -0,0 +1,64 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetVMInstanceView(Model):
+ """The instance view of a virtual machine scale set VM.
+
+ :param platform_update_domain: The Update Domain count.
+ :type platform_update_domain: int
+ :param platform_fault_domain: The Fault Domain count.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineAgentInstanceView
+ :param disks: The disks information.
+ :type disks: list[~azure.mgmt.compute.v2015_06_15.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionInstanceView]
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2015_06_15.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2015_06_15.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.disks = disks
+ self.extensions = extensions
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile.py
index 74df50229ecf..2379d8cfcbf1 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile.py
@@ -36,9 +36,9 @@ class VirtualMachineScaleSetVMProfile(Model):
'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
}
- def __init__(self, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None):
- super(VirtualMachineScaleSetVMProfile, self).__init__()
- self.os_profile = os_profile
- self.storage_profile = storage_profile
- self.network_profile = network_profile
- self.extension_profile = extension_profile
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = kwargs.get('os_profile', None)
+ self.storage_profile = kwargs.get('storage_profile', None)
+ self.network_profile = kwargs.get('network_profile', None)
+ self.extension_profile = kwargs.get('extension_profile', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile_py3.py
new file mode 100644
index 000000000000..b09b4007e761
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_profile_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 VirtualMachineScaleSetVMProfile(Model):
+ """Describes a virtual machine scale set virtual machine profile.
+
+ :param os_profile: The virtual machine scale set OS profile.
+ :type os_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetOSProfile
+ :param storage_profile: The virtual machine scale set storage profile.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetStorageProfile
+ :param network_profile: The virtual machine scale set network profile.
+ :type network_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetNetworkProfile
+ :param extension_profile: The virtual machine scale set extension profile.
+ :type extension_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetExtensionProfile
+ """
+
+ _attribute_map = {
+ 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'},
+ 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'},
+ 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'},
+ 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
+ }
+
+ def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = os_profile
+ self.storage_profile = storage_profile
+ self.network_profile = network_profile
+ self.extension_profile = extension_profile
diff --git a/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
new file mode 100644
index 000000000000..d69fd86bc0cf
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_scale_set_vm_py3.py
@@ -0,0 +1,149 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class VirtualMachineScaleSetVM(Resource):
+ """Describes a virtual machine scale set virtual machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar instance_id: The virtual machine instance ID.
+ :vartype instance_id: str
+ :ivar sku: The virtual machine SKU.
+ :vartype sku: ~azure.mgmt.compute.v2015_06_15.models.Sku
+ :ivar latest_model_applied: Specifies whether the latest model has been
+ applied to the virtual machine.
+ :vartype latest_model_applied: bool
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineInstanceView
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2015_06_15.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2015_06_15.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2015_06_15.models.SubResource
+ :param provisioning_state: The provisioning state, which only appears in
+ the response.
+ :type provisioning_state: str
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2015_06_15.models.Plan
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'instance_id': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'latest_model_applied': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'instance_id': {'key': 'instanceId', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': '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, provisioning_state: str=None, license_type: str=None, plan=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags, **kwargs)
+ self.instance_id = None
+ self.sku = None
+ self.latest_model_applied = None
+ self.instance_view = None
+ self.hardware_profile = hardware_profile
+ self.storage_profile = storage_profile
+ self.os_profile = os_profile
+ self.network_profile = network_profile
+ self.diagnostics_profile = diagnostics_profile
+ self.availability_set = availability_set
+ self.provisioning_state = provisioning_state
+ self.license_type = license_type
+ self.plan = plan
+ self.resources = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size.py
index 3f4fa7f06b70..0fef3efd6c8e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size.py
@@ -43,11 +43,11 @@ class VirtualMachineSize(Model):
'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'},
}
- def __init__(self, name=None, number_of_cores=None, os_disk_size_in_mb=None, resource_disk_size_in_mb=None, memory_in_mb=None, max_data_disk_count=None):
- super(VirtualMachineSize, self).__init__()
- 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
+ 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/v2015_06_15/models/virtual_machine_size_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_size_py3.py
new file mode 100644
index 000000000000..9f99ba20ce42
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/virtual_machine_status_code_count.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count.py
index 177515706064..7df7b702acd7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count.py
@@ -35,7 +35,7 @@ class VirtualMachineStatusCodeCount(Model):
'count': {'key': 'count', 'type': 'int'},
}
- def __init__(self):
- super(VirtualMachineStatusCodeCount, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineStatusCodeCount, self).__init__(**kwargs)
self.code = None
self.count = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_status_code_count_py3.py
new file mode 100644
index 000000000000..c38800073a95
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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/v2015_06_15/models/win_rm_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration.py
index efc18d734d09..12ecbcebb502 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration.py
@@ -24,6 +24,6 @@ class WinRMConfiguration(Model):
'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
}
- def __init__(self, listeners=None):
- super(WinRMConfiguration, self).__init__()
- self.listeners = listeners
+ def __init__(self, **kwargs):
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = kwargs.get('listeners', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_configuration_py3.py
new file mode 100644
index 000000000000..9936581e303b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.WinRMListener]
+ """
+
+ _attribute_map = {
+ 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
+ }
+
+ def __init__(self, *, listeners=None, **kwargs) -> None:
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = listeners
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener.py
index de48f1f46af5..d49afa13557f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener.py
@@ -36,7 +36,7 @@ class WinRMListener(Model):
'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
}
- def __init__(self, protocol=None, certificate_url=None):
- super(WinRMListener, self).__init__()
- self.protocol = protocol
- self.certificate_url = certificate_url
+ 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/v2015_06_15/models/win_rm_listener_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/win_rm_listener_py3.py
new file mode 100644
index 000000000000..f12546111314
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.ProtocolTypes
+ :param certificate_url: This is the URL of a certificate that has been
+ uploaded to Key Vault as a secret. For adding a secret to the Key Vault,
+ see [Add a key or secret to the key
+ vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).
+ In this case, your certificate needs to be It is the Base64 encoding of
+ the following JSON Object which is encoded in UTF-8:
{
+ "data":"",
"dataType":"pfx",
+ "password":""
}
+ :type certificate_url: str
+ """
+
+ _attribute_map = {
+ 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'},
+ 'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None:
+ super(WinRMListener, self).__init__(**kwargs)
+ self.protocol = protocol
+ self.certificate_url = certificate_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration.py
index b51d60452239..1bceb3629800 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration.py
@@ -45,10 +45,10 @@ class WindowsConfiguration(Model):
'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
}
- def __init__(self, provision_vm_agent=None, enable_automatic_updates=None, time_zone=None, additional_unattend_content=None, win_rm=None):
- super(WindowsConfiguration, self).__init__()
- 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
+ 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/v2015_06_15/models/windows_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/windows_configuration_py3.py
new file mode 100644
index 000000000000..5b976e421bac
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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.v2015_06_15.models.AdditionalUnattendContent]
+ :param win_rm: Specifies the Windows Remote Management listeners. This
+ enables remote Windows PowerShell.
+ :type win_rm: ~azure.mgmt.compute.v2015_06_15.models.WinRMConfiguration
+ """
+
+ _attribute_map = {
+ 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'},
+ 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'},
+ 'time_zone': {'key': 'timeZone', 'type': 'str'},
+ 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'},
+ 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
+ }
+
+ def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None:
+ super(WindowsConfiguration, self).__init__(**kwargs)
+ self.provision_vm_agent = provision_vm_agent
+ self.enable_automatic_updates = enable_automatic_updates
+ self.time_zone = time_zone
+ self.additional_unattend_content = additional_unattend_content
+ self.win_rm = win_rm
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extensions_operations.py
index b97eeb1ed994..096988d1f6ec 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extensions_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_extensions_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -93,7 +93,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -108,13 +108,16 @@ def create_or_update(
:type extension_parameters:
~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineExtension or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachineExtension
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -126,30 +129,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineExtension', response)
if raw:
@@ -158,12 +139,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -214,7 +196,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +207,16 @@ def delete(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -242,30 +227,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -274,12 +237,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_set_vms_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_set_vms_operations.py
index d09f86aedb77..66a9d41aed6e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_set_vms_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_set_vms_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -87,7 +87,7 @@ def _reimage_initial(
return deserialized
def reimage(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -98,13 +98,16 @@ def reimage(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_initial(
@@ -115,30 +118,8 @@ def reimage(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -147,12 +128,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -203,7 +185,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -216,13 +198,16 @@ def deallocate(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -233,30 +218,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -265,12 +228,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -321,7 +285,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -331,13 +295,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -348,30 +315,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -380,12 +325,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -652,7 +598,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -665,13 +611,16 @@ def power_off(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -682,30 +631,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -714,12 +641,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -770,7 +698,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -780,13 +708,16 @@ def restart(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -797,30 +728,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -829,12 +738,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -885,7 +795,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -895,13 +805,16 @@ def start(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -912,30 +825,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -944,10 +835,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_sets_operations.py
index 6ea9dd0db2e3..7f5c7ee6d78e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_sets_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machine_scale_sets_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Create or update a VM scale set.
:param resource_group_name: The name of the resource group.
@@ -103,13 +103,16 @@ def create_or_update(
:type parameters:
~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineScaleSet or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachineScaleSet
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -120,30 +123,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineScaleSet', response)
if raw:
@@ -152,12 +133,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -207,7 +189,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -215,13 +197,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -231,30 +216,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -263,12 +226,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -391,7 +355,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -407,13 +371,16 @@ def deallocate(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -424,30 +391,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -456,12 +401,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -517,7 +463,7 @@ def _delete_instances_initial(
return deserialized
def delete_instances(
- self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -527,13 +473,16 @@ def delete_instances(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_instances_initial(
@@ -544,30 +493,8 @@ def delete_instances(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -576,12 +503,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -914,7 +842,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -930,13 +858,16 @@ def power_off(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -947,30 +878,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -979,12 +888,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1045,7 +955,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1058,13 +968,16 @@ def restart(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -1075,30 +988,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1107,12 +998,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1173,7 +1065,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1186,13 +1078,16 @@ def start(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -1203,30 +1098,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1235,12 +1108,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1296,7 +1170,7 @@ def _update_instances_initial(
return deserialized
def update_instances(
- self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1307,13 +1181,16 @@ def update_instances(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._update_instances_initial(
@@ -1324,30 +1201,8 @@ def update_instances(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1356,12 +1211,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1411,7 +1267,7 @@ def _reimage_initial(
return deserialized
def reimage(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Reimages (upgrade the operating system) one or more virtual machines in
a VM scale set.
@@ -1420,13 +1276,16 @@ def reimage(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_initial(
@@ -1436,30 +1295,8 @@ def reimage(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1468,10 +1305,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machines_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machines_operations.py
index 505a2e370fce..27776073ef24 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machines_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/virtual_machines_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -90,7 +90,7 @@ def _capture_initial(
return deserialized
def capture(
- self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -103,13 +103,17 @@ def capture(
:type parameters:
~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureParameters
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineCaptureResult or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns
+ VirtualMachineCaptureResult or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureResult]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineCaptureResult]]
:raises: :class:`CloudError`
"""
raw_result = self._capture_initial(
@@ -120,30 +124,8 @@ def capture(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineCaptureResult', response)
if raw:
@@ -152,12 +134,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -213,7 +196,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +208,16 @@ def create_or_update(
:type parameters:
~azure.mgmt.compute.v2015_06_15.models.VirtualMachine
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachine or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachine or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.VirtualMachine]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -242,30 +228,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachine', response)
if raw:
@@ -274,12 +238,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -329,7 +294,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -337,13 +302,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -353,30 +321,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -385,12 +331,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -509,7 +456,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -519,13 +466,16 @@ def deallocate(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -535,30 +485,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -567,12 +495,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -893,7 +822,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -903,13 +832,16 @@ def power_off(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -919,30 +851,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -951,12 +861,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1006,7 +917,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1014,13 +925,16 @@ def restart(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -1030,30 +944,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1062,12 +954,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1117,7 +1010,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1125,13 +1018,16 @@ def start(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -1141,30 +1037,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1173,12 +1047,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1228,7 +1103,7 @@ def _redeploy_initial(
return deserialized
def redeploy(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1236,13 +1111,16 @@ def redeploy(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._redeploy_initial(
@@ -1252,30 +1130,8 @@ def redeploy(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1284,10 +1140,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py
index 0f116cbe6a44..6a083cc17f20 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py
@@ -9,83 +9,162 @@
# regenerated.
# --------------------------------------------------------------------------
-from .instance_view_status import InstanceViewStatus
-from .sub_resource import SubResource
-from .availability_set import AvailabilitySet
-from .virtual_machine_size import VirtualMachineSize
-from .virtual_machine_extension_image import VirtualMachineExtensionImage
-from .virtual_machine_image_resource import VirtualMachineImageResource
-from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
-from .virtual_machine_extension import VirtualMachineExtension
-from .purchase_plan import PurchasePlan
-from .os_disk_image import OSDiskImage
-from .data_disk_image import DataDiskImage
-from .virtual_machine_image import VirtualMachineImage
-from .usage_name import UsageName
-from .usage import Usage
-from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
-from .virtual_machine_capture_result import VirtualMachineCaptureResult
-from .plan import Plan
-from .hardware_profile import HardwareProfile
-from .image_reference import ImageReference
-from .key_vault_secret_reference import KeyVaultSecretReference
-from .key_vault_key_reference import KeyVaultKeyReference
-from .disk_encryption_settings import DiskEncryptionSettings
-from .virtual_hard_disk import VirtualHardDisk
-from .os_disk import OSDisk
-from .data_disk import DataDisk
-from .storage_profile import StorageProfile
-from .additional_unattend_content import AdditionalUnattendContent
-from .win_rm_listener import WinRMListener
-from .win_rm_configuration import WinRMConfiguration
-from .windows_configuration import WindowsConfiguration
-from .ssh_public_key import SshPublicKey
-from .ssh_configuration import SshConfiguration
-from .linux_configuration import LinuxConfiguration
-from .vault_certificate import VaultCertificate
-from .vault_secret_group import VaultSecretGroup
-from .os_profile import OSProfile
-from .network_interface_reference import NetworkInterfaceReference
-from .network_profile import NetworkProfile
-from .boot_diagnostics import BootDiagnostics
-from .diagnostics_profile import DiagnosticsProfile
-from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
-from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
-from .disk_instance_view import DiskInstanceView
-from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
-from .virtual_machine_identity import VirtualMachineIdentity
-from .virtual_machine_instance_view import VirtualMachineInstanceView
-from .virtual_machine import VirtualMachine
-from .sku import Sku
-from .upgrade_policy import UpgradePolicy
-from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity
-from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
-from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
-from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
-from .api_entity_reference import ApiEntityReference
-from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
-from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
-from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
-from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
-from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
-from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
-from .virtual_machine_scale_set import VirtualMachineScaleSet
-from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
-from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
-from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
-from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
-from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
-from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
-from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
-from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
-from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM
-from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView
-from .api_error_base import ApiErrorBase
-from .inner_error import InnerError
-from .api_error import ApiError
-from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
-from .resource import Resource
-from .operation_status_response import OperationStatusResponse
+try:
+ from .instance_view_status_py3 import InstanceViewStatus
+ from .sub_resource_py3 import SubResource
+ from .availability_set_py3 import AvailabilitySet
+ from .virtual_machine_size_py3 import VirtualMachineSize
+ from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource_py3 import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension_py3 import VirtualMachineExtension
+ from .purchase_plan_py3 import PurchasePlan
+ from .os_disk_image_py3 import OSDiskImage
+ from .data_disk_image_py3 import DataDiskImage
+ from .virtual_machine_image_py3 import VirtualMachineImage
+ from .usage_name_py3 import UsageName
+ from .usage_py3 import Usage
+ from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult
+ from .plan_py3 import Plan
+ from .hardware_profile_py3 import HardwareProfile
+ from .image_reference_py3 import ImageReference
+ from .key_vault_secret_reference_py3 import KeyVaultSecretReference
+ from .key_vault_key_reference_py3 import KeyVaultKeyReference
+ from .disk_encryption_settings_py3 import DiskEncryptionSettings
+ from .virtual_hard_disk_py3 import VirtualHardDisk
+ from .os_disk_py3 import OSDisk
+ from .data_disk_py3 import DataDisk
+ from .storage_profile_py3 import StorageProfile
+ from .additional_unattend_content_py3 import AdditionalUnattendContent
+ from .win_rm_listener_py3 import WinRMListener
+ from .win_rm_configuration_py3 import WinRMConfiguration
+ from .windows_configuration_py3 import WindowsConfiguration
+ from .ssh_public_key_py3 import SshPublicKey
+ from .ssh_configuration_py3 import SshConfiguration
+ from .linux_configuration_py3 import LinuxConfiguration
+ from .vault_certificate_py3 import VaultCertificate
+ from .vault_secret_group_py3 import VaultSecretGroup
+ from .os_profile_py3 import OSProfile
+ from .network_interface_reference_py3 import NetworkInterfaceReference
+ from .network_profile_py3 import NetworkProfile
+ from .boot_diagnostics_py3 import BootDiagnostics
+ from .diagnostics_profile_py3 import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView
+ from .disk_instance_view_py3 import DiskInstanceView
+ from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView
+ from .virtual_machine_identity_py3 import VirtualMachineIdentity
+ from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView
+ from .virtual_machine_py3 import VirtualMachine
+ from .sku_py3 import Sku
+ from .upgrade_policy_py3 import UpgradePolicy
+ from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity
+ from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile
+ from .api_entity_reference_py3 import ApiEntityReference
+ from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku
+ from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM
+ from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView
+ from .api_error_base_py3 import ApiErrorBase
+ from .inner_error_py3 import InnerError
+ from .api_error_py3 import ApiError
+ from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties
+ from .resource_py3 import Resource
+ from .operation_status_response_py3 import OperationStatusResponse
+except (SyntaxError, ImportError):
+ from .instance_view_status import InstanceViewStatus
+ from .sub_resource import SubResource
+ from .availability_set import AvailabilitySet
+ from .virtual_machine_size import VirtualMachineSize
+ from .virtual_machine_extension_image import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension import VirtualMachineExtension
+ from .purchase_plan import PurchasePlan
+ from .os_disk_image import OSDiskImage
+ from .data_disk_image import DataDiskImage
+ from .virtual_machine_image import VirtualMachineImage
+ from .usage_name import UsageName
+ from .usage import Usage
+ from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result import VirtualMachineCaptureResult
+ from .plan import Plan
+ from .hardware_profile import HardwareProfile
+ from .image_reference import ImageReference
+ from .key_vault_secret_reference import KeyVaultSecretReference
+ from .key_vault_key_reference import KeyVaultKeyReference
+ from .disk_encryption_settings import DiskEncryptionSettings
+ from .virtual_hard_disk import VirtualHardDisk
+ from .os_disk import OSDisk
+ from .data_disk import DataDisk
+ from .storage_profile import StorageProfile
+ from .additional_unattend_content import AdditionalUnattendContent
+ from .win_rm_listener import WinRMListener
+ from .win_rm_configuration import WinRMConfiguration
+ from .windows_configuration import WindowsConfiguration
+ from .ssh_public_key import SshPublicKey
+ from .ssh_configuration import SshConfiguration
+ from .linux_configuration import LinuxConfiguration
+ from .vault_certificate import VaultCertificate
+ from .vault_secret_group import VaultSecretGroup
+ from .os_profile import OSProfile
+ from .network_interface_reference import NetworkInterfaceReference
+ from .network_profile import NetworkProfile
+ from .boot_diagnostics import BootDiagnostics
+ from .diagnostics_profile import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
+ from .disk_instance_view import DiskInstanceView
+ from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
+ from .virtual_machine_identity import VirtualMachineIdentity
+ from .virtual_machine_instance_view import VirtualMachineInstanceView
+ from .virtual_machine import VirtualMachine
+ from .sku import Sku
+ from .upgrade_policy import UpgradePolicy
+ from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity
+ from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
+ from .api_entity_reference import ApiEntityReference
+ from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
+ from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM
+ from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView
+ from .api_error_base import ApiErrorBase
+ from .inner_error import InnerError
+ from .api_error import ApiError
+ from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
+ from .resource import Resource
+ from .operation_status_response import OperationStatusResponse
from .availability_set_paged import AvailabilitySetPaged
from .virtual_machine_size_paged import VirtualMachineSizePaged
from .usage_paged import UsagePaged
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content.py
index d23281b2b312..d08808bb1c86 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content.py
@@ -44,9 +44,9 @@ class AdditionalUnattendContent(Model):
'content': {'key': 'content', 'type': 'str'},
}
- def __init__(self, pass_name=None, component_name=None, setting_name=None, content=None):
- super(AdditionalUnattendContent, self).__init__()
- self.pass_name = pass_name
- self.component_name = component_name
- self.setting_name = setting_name
- self.content = content
+ 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/v2016_03_30/models/additional_unattend_content_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/additional_unattend_content_py3.py
new file mode 100644
index 000000000000..ae5bfe4f555f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.PassNames
+ :param component_name: The component name. Currently, the only allowable
+ value is Microsoft-Windows-Shell-Setup. Possible values include:
+ 'Microsoft-Windows-Shell-Setup'
+ :type component_name: str or
+ ~azure.mgmt.compute.v2016_03_30.models.ComponentNames
+ :param setting_name: Specifies the name of the setting to which the
+ content applies. Possible values are: FirstLogonCommands and AutoLogon.
+ Possible values include: 'AutoLogon', 'FirstLogonCommands'
+ :type setting_name: str or
+ ~azure.mgmt.compute.v2016_03_30.models.SettingNames
+ :param content: Specifies the XML formatted content that is added to the
+ unattend.xml file for the specified path and component. The XML must be
+ less than 4KB and must include the root element for the setting or feature
+ that is being inserted.
+ :type content: str
+ """
+
+ _attribute_map = {
+ 'pass_name': {'key': 'passName', 'type': 'PassNames'},
+ 'component_name': {'key': 'componentName', 'type': 'ComponentNames'},
+ 'setting_name': {'key': 'settingName', 'type': 'SettingNames'},
+ 'content': {'key': 'content', 'type': 'str'},
+ }
+
+ def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None:
+ super(AdditionalUnattendContent, self).__init__(**kwargs)
+ self.pass_name = pass_name
+ self.component_name = component_name
+ self.setting_name = setting_name
+ self.content = content
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference.py
index 27696aacc3dc..d1bf572e916d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference.py
@@ -24,6 +24,6 @@ class ApiEntityReference(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(ApiEntityReference, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(ApiEntityReference, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_entity_reference_py3.py
new file mode 100644
index 000000000000..da3e07082381
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/api_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error.py
index b88bc0c04faa..979a44dc777d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error.py
@@ -35,10 +35,10 @@ class ApiError(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, details=None, innererror=None, code=None, target=None, message=None):
- super(ApiError, self).__init__()
- self.details = details
- self.innererror = innererror
- self.code = code
- self.target = target
- self.message = message
+ 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/v2016_03_30/models/api_error_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base.py
index 2fb33a0ff411..655c08638905 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base.py
@@ -29,8 +29,8 @@ class ApiErrorBase(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, code=None, target=None, message=None):
- super(ApiErrorBase, self).__init__()
- self.code = code
- self.target = target
- self.message = message
+ 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/v2016_03_30/models/api_error_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_base_py3.py
new file mode 100644
index 000000000000..5ba95aa0283e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/api_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/api_error_py3.py
new file mode 100644
index 000000000000..5a68b96923d1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.ApiErrorBase]
+ :param innererror: The Api inner error
+ :type innererror: ~azure.mgmt.compute.v2016_03_30.models.InnerError
+ :param code: The error code.
+ :type code: str
+ :param target: The target of the particular error.
+ :type target: str
+ :param message: The error message.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'details': {'key': 'details', 'type': '[ApiErrorBase]'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ 'code': {'key': 'code', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None:
+ super(ApiError, self).__init__(**kwargs)
+ self.details = details
+ self.innererror = innererror
+ self.code = code
+ self.target = target
+ self.message = message
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set.py
index 3fb6b532f8a3..cadfd47b6761 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set.py
@@ -28,13 +28,15 @@ class AvailabilitySet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -71,9 +73,9 @@ class AvailabilitySet(Resource):
'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, location, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None):
- super(AvailabilitySet, self).__init__(location=location, tags=tags)
- self.platform_update_domain_count = platform_update_domain_count
- self.platform_fault_domain_count = platform_fault_domain_count
- self.virtual_machines = virtual_machines
+ def __init__(self, **kwargs):
+ super(AvailabilitySet, self).__init__(**kwargs)
+ self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None)
+ self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None)
+ self.virtual_machines = kwargs.get('virtual_machines', None)
self.statuses = None
diff --git a/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
new file mode 100644
index 000000000000..610f6ab71d8c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/availability_set_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 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.v2016_03_30.models.SubResource]
+ :ivar statuses: The resource status information.
+ :vartype statuses:
+ list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'statuses': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
+ 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
+ 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
+ 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, **kwargs) -> None:
+ super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs)
+ self.platform_update_domain_count = platform_update_domain_count
+ self.platform_fault_domain_count = platform_fault_domain_count
+ self.virtual_machines = virtual_machines
+ self.statuses = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics.py
index c94d188e3fba..ca3dbdd4f23c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics.py
@@ -32,7 +32,7 @@ class BootDiagnostics(Model):
'storage_uri': {'key': 'storageUri', 'type': 'str'},
}
- def __init__(self, enabled=None, storage_uri=None):
- super(BootDiagnostics, self).__init__()
- self.enabled = enabled
- self.storage_uri = storage_uri
+ 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/v2016_03_30/models/boot_diagnostics_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view.py
index 4ec7b385558d..6fe1f84a3910 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view.py
@@ -26,7 +26,7 @@ class BootDiagnosticsInstanceView(Model):
'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'},
}
- def __init__(self, console_screenshot_blob_uri=None, serial_console_log_blob_uri=None):
- super(BootDiagnosticsInstanceView, self).__init__()
- self.console_screenshot_blob_uri = console_screenshot_blob_uri
- self.serial_console_log_blob_uri = serial_console_log_blob_uri
+ 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/v2016_03_30/models/boot_diagnostics_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_instance_view_py3.py
new file mode 100644
index 000000000000..d85b51981ab9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/boot_diagnostics_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_py3.py
new file mode 100644
index 000000000000..b0a756ea4fa0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/compute_long_running_operation_properties.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties.py
index f8ca23e0ccdf..66ff353eb206 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties.py
@@ -23,6 +23,6 @@ class ComputeLongRunningOperationProperties(Model):
'output': {'key': 'output', 'type': 'object'},
}
- def __init__(self, output=None):
- super(ComputeLongRunningOperationProperties, self).__init__()
- self.output = output
+ def __init__(self, **kwargs):
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties_py3.py
new file mode 100644
index 000000000000..a4ffd6c8c32f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_long_running_operation_properties_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 ComputeLongRunningOperationProperties(Model):
+ """Compute-specific operation properties, including output.
+
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'output': {'key': 'output', 'type': 'object'},
+ }
+
+ def __init__(self, *, output=None, **kwargs) -> None:
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_management_client_enums.py
index f73f8041f915..724cbcdb599e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_management_client_enums.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/compute_management_client_enums.py
@@ -12,20 +12,20 @@
from enum import Enum
-class StatusLevelTypes(Enum):
+class StatusLevelTypes(str, Enum):
info = "Info"
warning = "Warning"
error = "Error"
-class OperatingSystemTypes(Enum):
+class OperatingSystemTypes(str, Enum):
windows = "Windows"
linux = "Linux"
-class VirtualMachineSizeTypes(Enum):
+class VirtualMachineSizeTypes(str, Enum):
basic_a0 = "Basic_A0"
basic_a1 = "Basic_A1"
@@ -92,59 +92,59 @@ class VirtualMachineSizeTypes(Enum):
standard_gs5 = "Standard_GS5"
-class CachingTypes(Enum):
+class CachingTypes(str, Enum):
none = "None"
read_only = "ReadOnly"
read_write = "ReadWrite"
-class DiskCreateOptionTypes(Enum):
+class DiskCreateOptionTypes(str, Enum):
from_image = "FromImage"
empty = "Empty"
attach = "Attach"
-class PassNames(Enum):
+class PassNames(str, Enum):
oobe_system = "OobeSystem"
-class ComponentNames(Enum):
+class ComponentNames(str, Enum):
microsoft_windows_shell_setup = "Microsoft-Windows-Shell-Setup"
-class SettingNames(Enum):
+class SettingNames(str, Enum):
auto_logon = "AutoLogon"
first_logon_commands = "FirstLogonCommands"
-class ProtocolTypes(Enum):
+class ProtocolTypes(str, Enum):
http = "Http"
https = "Https"
-class ResourceIdentityType(Enum):
+class ResourceIdentityType(str, Enum):
system_assigned = "SystemAssigned"
-class UpgradeMode(Enum):
+class UpgradeMode(str, Enum):
automatic = "Automatic"
manual = "Manual"
-class VirtualMachineScaleSetSkuScaleType(Enum):
+class VirtualMachineScaleSetSkuScaleType(str, Enum):
automatic = "Automatic"
none = "None"
-class InstanceViewTypes(Enum):
+class InstanceViewTypes(str, Enum):
instance_view = "instanceView"
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk.py
index 9011f365243b..b7faf4202ea7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk.py
@@ -15,13 +15,15 @@
class DataDisk(Model):
"""Describes a data disk.
- :param 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.
+ 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.
+ :param name: Required. The disk name.
:type name: str
- :param vhd: The virtual hard disk.
+ :param vhd: Required. The virtual hard disk.
:type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk
:param image: The source user image virtual hard disk. The virtual hard
disk will be copied before being attached to the virtual machine. If
@@ -33,8 +35,8 @@ class DataDisk(Model):
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -66,12 +68,12 @@ class DataDisk(Model):
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
}
- def __init__(self, lun, name, vhd, create_option, image=None, caching=None, disk_size_gb=None):
- super(DataDisk, self).__init__()
- self.lun = lun
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
+ def __init__(self, **kwargs):
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = kwargs.get('lun', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image.py
index 60a4befc525f..b5dbfcefb472 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image.py
@@ -32,6 +32,6 @@ class DataDiskImage(Model):
'lun': {'key': 'lun', 'type': 'int'},
}
- def __init__(self):
- super(DataDiskImage, self).__init__()
+ def __init__(self, **kwargs):
+ super(DataDiskImage, self).__init__(**kwargs)
self.lun = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_image_py3.py
new file mode 100644
index 000000000000..8431a3988502
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_py3.py
new file mode 100644
index 000000000000..71fe40ece87d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/data_disk_py3.py
@@ -0,0 +1,79 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DataDisk(Model):
+ """Describes a data disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
+ :type lun: int
+ :param name: Required. The disk name.
+ :type name: str
+ :param vhd: Required. The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the name of the disk in a
+ virtual machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ 'name': {'required': True},
+ 'vhd': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ }
+
+ def __init__(self, *, lun: int, name: str, vhd, create_option, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None:
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = lun
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile.py
index 3b584296d3a6..5a14b0394223 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile.py
@@ -29,6 +29,6 @@ class DiagnosticsProfile(Model):
'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
}
- def __init__(self, boot_diagnostics=None):
- super(DiagnosticsProfile, self).__init__()
- self.boot_diagnostics = boot_diagnostics
+ 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/v2016_03_30/models/diagnostics_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/diagnostics_profile_py3.py
new file mode 100644
index 000000000000..19ecbb17acbd
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.BootDiagnostics
+ """
+
+ _attribute_map = {
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
+ }
+
+ def __init__(self, *, boot_diagnostics=None, **kwargs) -> None:
+ super(DiagnosticsProfile, self).__init__(**kwargs)
+ self.boot_diagnostics = boot_diagnostics
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings.py
index 744da2c88271..4ccf7b295cd9 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings.py
@@ -34,8 +34,8 @@ class DiskEncryptionSettings(Model):
'enabled': {'key': 'enabled', 'type': 'bool'},
}
- def __init__(self, disk_encryption_key=None, key_encryption_key=None, enabled=None):
- super(DiskEncryptionSettings, self).__init__()
- self.disk_encryption_key = disk_encryption_key
- self.key_encryption_key = key_encryption_key
- self.enabled = enabled
+ 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/v2016_03_30/models/disk_encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_encryption_settings_py3.py
new file mode 100644
index 000000000000..b88964dd19c7
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.KeyVaultSecretReference
+ :param key_encryption_key: Specifies the location of the key encryption
+ key in Key Vault.
+ :type key_encryption_key:
+ ~azure.mgmt.compute.v2016_03_30.models.KeyVaultKeyReference
+ :param enabled: Specifies whether disk encryption should be enabled on the
+ virtual machine.
+ :type enabled: bool
+ """
+
+ _attribute_map = {
+ 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'},
+ 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'},
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ }
+
+ def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None:
+ super(DiskEncryptionSettings, self).__init__(**kwargs)
+ self.disk_encryption_key = disk_encryption_key
+ self.key_encryption_key = key_encryption_key
+ self.enabled = enabled
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view.py
index e194a345c730..50ab86fe9eca 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view.py
@@ -27,7 +27,7 @@ class DiskInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, statuses=None):
- super(DiskInstanceView, self).__init__()
- self.name = name
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(DiskInstanceView, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view_py3.py
new file mode 100644
index 000000000000..8da1a08ac029
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/disk_instance_view_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 DiskInstanceView(Model):
+ """The instance view of the disk.
+
+ :param name: The disk name.
+ :type name: str
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None:
+ super(DiskInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile.py
index 07b71cbe3a97..17905f6abd8d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile.py
@@ -50,6 +50,6 @@ class HardwareProfile(Model):
'vm_size': {'key': 'vmSize', 'type': 'str'},
}
- def __init__(self, vm_size=None):
- super(HardwareProfile, self).__init__()
- self.vm_size = vm_size
+ 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/v2016_03_30/models/hardware_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_profile_py3.py
new file mode 100644
index 000000000000..8cabe516cb6f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/hardware_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 HardwareProfile(Model):
+ """Specifies the hardware settings for the virtual machine.
+
+ :param vm_size: Specifies the size of the virtual machine. For more
+ information about virtual machine sizes, see [Sizes for virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
The available VM sizes depend on region and availability set. For
+ a list of available sizes use these APIs:
[List all available
+ virtual machine sizes in an availability
+ set](virtualmachines-list-sizes-availability-set.md)
[List all
+ available virtual machine sizes in a
+ region](virtualmachines-list-sizes-region.md)
[List all available
+ virtual machine sizes for
+ resizing](virtualmachines-list-sizes-for-resizing.md). Possible values
+ include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4',
+ 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4',
+ 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9',
+ 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2',
+ 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12',
+ 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2',
+ 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2',
+ 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2',
+ 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3',
+ 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13',
+ 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2',
+ 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2',
+ 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2',
+ 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3',
+ 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2',
+ 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'
+ :type vm_size: str or
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineSizeTypes
+ """
+
+ _attribute_map = {
+ 'vm_size': {'key': 'vmSize', 'type': 'str'},
+ }
+
+ def __init__(self, *, vm_size=None, **kwargs) -> None:
+ super(HardwareProfile, self).__init__(**kwargs)
+ self.vm_size = vm_size
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference.py
index 3aa6e4826ee8..d83cc00f394f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference.py
@@ -43,9 +43,9 @@ class ImageReference(Model):
'version': {'key': 'version', 'type': 'str'},
}
- def __init__(self, publisher=None, offer=None, sku=None, version=None):
- super(ImageReference, self).__init__()
- self.publisher = publisher
- self.offer = offer
- self.sku = sku
- self.version = version
+ 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/v2016_03_30/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference_py3.py
new file mode 100644
index 000000000000..ec4e3f91dee4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/image_reference_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 ImageReference(Model):
+ """Specifies information about the image to use. You can specify information
+ about platform images, marketplace images, or virtual machine images. This
+ element is required when you want to use a platform image, marketplace
+ image, or virtual machine image, but is not used in other creation
+ operations.
+
+ :param publisher: The image publisher.
+ :type publisher: str
+ :param offer: Specifies the offer of the platform image or marketplace
+ image used to create the virtual machine.
+ :type offer: str
+ :param sku: The image SKU.
+ :type sku: str
+ :param version: Specifies the version of the platform image or marketplace
+ image used to create the virtual machine. The allowed formats are
+ Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal
+ numbers. Specify 'latest' to use the latest version of an image available
+ at deploy time. Even if you use 'latest', the VM image will not
+ automatically update after deploy time even if a new version becomes
+ available.
+ :type version: str
+ """
+
+ _attribute_map = {
+ 'publisher': {'key': 'publisher', 'type': 'str'},
+ 'offer': {'key': 'offer', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'str'},
+ 'version': {'key': 'version', 'type': 'str'},
+ }
+
+ def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, **kwargs) -> None:
+ super(ImageReference, self).__init__(**kwargs)
+ self.publisher = publisher
+ self.offer = offer
+ self.sku = sku
+ self.version = version
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error.py
index de77683e2fc8..6324249d7c19 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error.py
@@ -26,7 +26,7 @@ class InnerError(Model):
'errordetail': {'key': 'errordetail', 'type': 'str'},
}
- def __init__(self, exceptiontype=None, errordetail=None):
- super(InnerError, self).__init__()
- self.exceptiontype = exceptiontype
- self.errordetail = errordetail
+ 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/v2016_03_30/models/inner_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/inner_error_py3.py
new file mode 100644
index 000000000000..ccec30d7b53f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/instance_view_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status.py
index f95f31593506..55af5b89ce75 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status.py
@@ -38,10 +38,10 @@ class InstanceViewStatus(Model):
'time': {'key': 'time', 'type': 'iso-8601'},
}
- def __init__(self, code=None, level=None, display_status=None, message=None, time=None):
- super(InstanceViewStatus, self).__init__()
- self.code = code
- self.level = level
- self.display_status = display_status
- self.message = message
- self.time = time
+ 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/v2016_03_30/models/instance_view_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/instance_view_status_py3.py
new file mode 100644
index 000000000000..87a7679454a0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.StatusLevelTypes
+ :param display_status: The short localizable label for the status.
+ :type display_status: str
+ :param message: The detailed status message, including for alerts and
+ error messages.
+ :type message: str
+ :param time: The time of the status.
+ :type time: datetime
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'level': {'key': 'level', 'type': 'StatusLevelTypes'},
+ 'display_status': {'key': 'displayStatus', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'time': {'key': 'time', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None:
+ super(InstanceViewStatus, self).__init__(**kwargs)
+ self.code = code
+ self.level = level
+ self.display_status = display_status
+ self.message = message
+ self.time = time
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference.py
index 46d74426d42e..49da8ab13dab 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference.py
@@ -15,9 +15,13 @@
class KeyVaultKeyReference(Model):
"""Describes a reference to Key Vault Key.
- :param key_url: The URL referencing a key encryption key in Key Vault.
+ 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: The relative URL of the Key Vault containing the key.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the key.
:type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource
"""
@@ -31,7 +35,7 @@ class KeyVaultKeyReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, key_url, source_vault):
- super(KeyVaultKeyReference, self).__init__()
- self.key_url = key_url
- self.source_vault = source_vault
+ 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/v2016_03_30/models/key_vault_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_key_reference_py3.py
new file mode 100644
index 000000000000..7b4901a56e4c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.SubResource
+ """
+
+ _validation = {
+ 'key_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key_url': {'key': 'keyUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, key_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultKeyReference, self).__init__(**kwargs)
+ self.key_url = key_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference.py
index bbd96b98c1df..41102a59518b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference.py
@@ -15,10 +15,12 @@
class KeyVaultSecretReference(Model):
"""Describes a reference to Key Vault Secret.
- :param secret_url: The URL referencing a secret in a Key Vault.
+ 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: The relative URL of the Key Vault containing the
- secret.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the secret.
:type source_vault: ~azure.mgmt.compute.v2016_03_30.models.SubResource
"""
@@ -32,7 +34,7 @@ class KeyVaultSecretReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, secret_url, source_vault):
- super(KeyVaultSecretReference, self).__init__()
- self.secret_url = secret_url
- self.source_vault = source_vault
+ 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/v2016_03_30/models/key_vault_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/key_vault_secret_reference_py3.py
new file mode 100644
index 000000000000..18d593c7d070
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.SubResource
+ """
+
+ _validation = {
+ 'secret_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'secret_url': {'key': 'secretUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultSecretReference, self).__init__(**kwargs)
+ self.secret_url = secret_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration.py
index 164095d48d01..b4d5fc4466cb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration.py
@@ -33,7 +33,7 @@ class LinuxConfiguration(Model):
'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
}
- def __init__(self, disable_password_authentication=None, ssh=None):
- super(LinuxConfiguration, self).__init__()
- self.disable_password_authentication = disable_password_authentication
- self.ssh = ssh
+ 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/v2016_03_30/models/linux_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/linux_configuration_py3.py
new file mode 100644
index 000000000000..06eca3be10eb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.SshConfiguration
+ """
+
+ _attribute_map = {
+ 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'},
+ 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
+ }
+
+ def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None:
+ super(LinuxConfiguration, self).__init__(**kwargs)
+ self.disable_password_authentication = disable_password_authentication
+ self.ssh = ssh
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference.py
index 80c743c0d8e3..b86e305e3f74 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_interface_reference.py
@@ -27,6 +27,6 @@ class NetworkInterfaceReference(SubResource):
'primary': {'key': 'properties.primary', 'type': 'bool'},
}
- def __init__(self, id=None, primary=None):
- super(NetworkInterfaceReference, self).__init__(id=id)
- self.primary = primary
+ def __init__(self, **kwargs):
+ super(NetworkInterfaceReference, self).__init__(**kwargs)
+ self.primary = kwargs.get('primary', None)
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
new file mode 100644
index 000000000000..f42ead50fc36
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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 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/v2016_03_30/models/network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile.py
index 0d975b416184..e4379407b005 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile.py
@@ -25,6 +25,6 @@ class NetworkProfile(Model):
'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
}
- def __init__(self, network_interfaces=None):
- super(NetworkProfile, self).__init__()
- self.network_interfaces = network_interfaces
+ 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/v2016_03_30/models/network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/network_profile_py3.py
new file mode 100644
index 000000000000..9ff2f4071b94
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.NetworkInterfaceReference]
+ """
+
+ _attribute_map = {
+ 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
+ }
+
+ def __init__(self, *, network_interfaces=None, **kwargs) -> None:
+ super(NetworkProfile, self).__init__(**kwargs)
+ self.network_interfaces = network_interfaces
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response.py
index e95e0c121b6e..df6f59201253 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response.py
@@ -46,8 +46,8 @@ class OperationStatusResponse(Model):
'error': {'key': 'error', 'type': 'ApiError'},
}
- def __init__(self):
- super(OperationStatusResponse, self).__init__()
+ def __init__(self, **kwargs):
+ super(OperationStatusResponse, self).__init__(**kwargs)
self.name = None
self.status = None
self.start_time = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response_py3.py
new file mode 100644
index 000000000000..3322243b174b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/operation_status_response_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 OperationStatusResponse(Model):
+ """Operation status response.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: Operation ID
+ :vartype name: str
+ :ivar status: Operation status
+ :vartype status: str
+ :ivar start_time: Start time of the operation
+ :vartype start_time: datetime
+ :ivar end_time: End time of the operation
+ :vartype end_time: datetime
+ :ivar error: Api error
+ :vartype error: ~azure.mgmt.compute.v2016_03_30.models.ApiError
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'status': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'end_time': {'readonly': True},
+ 'error': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'end_time': {'key': 'endTime', 'type': 'iso-8601'},
+ 'error': {'key': 'error', 'type': 'ApiError'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(OperationStatusResponse, self).__init__(**kwargs)
+ self.name = None
+ self.status = None
+ self.start_time = None
+ self.end_time = None
+ self.error = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk.py
index 37e285d35a6e..459ddcd37863 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk.py
@@ -18,6 +18,8 @@ class OSDisk(Model):
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**
@@ -28,9 +30,9 @@ class OSDisk(Model):
Disk.
Minimum api-version: 2015-06-15
:type encryption_settings:
~azure.mgmt.compute.v2016_03_30.models.DiskEncryptionSettings
- :param name: The disk name.
+ :param name: Required. The disk name.
:type name: str
- :param vhd: The virtual hard disk.
+ :param vhd: Required. The virtual hard disk.
:type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk
:param image: The source user image virtual hard disk. The virtual hard
disk will be copied before being attached to the virtual machine. If
@@ -42,8 +44,8 @@ class OSDisk(Model):
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -75,13 +77,13 @@ class OSDisk(Model):
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
}
- def __init__(self, name, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb=None):
- super(OSDisk, self).__init__()
- self.os_type = os_type
- self.encryption_settings = encryption_settings
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
+ def __init__(self, **kwargs):
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = kwargs.get('os_type', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image.py
index 32781b2a504e..339628798b5f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image.py
@@ -15,8 +15,10 @@
class OSDiskImage(Model):
"""Contains the os disk image information.
- :param operating_system: The operating system of the osDiskImage. Possible
- values include: 'Windows', 'Linux'
+ All required parameters must be populated in order to send to Azure.
+
+ :param operating_system: Required. The operating system of the
+ osDiskImage. Possible values include: 'Windows', 'Linux'
:type operating_system: str or
~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes
"""
@@ -29,6 +31,6 @@ class OSDiskImage(Model):
'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
}
- def __init__(self, operating_system):
- super(OSDiskImage, self).__init__()
- self.operating_system = operating_system
+ 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/v2016_03_30/models/os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_image_py3.py
new file mode 100644
index 000000000000..cab289838bad
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.OperatingSystemTypes
+ """
+
+ _validation = {
+ 'operating_system': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
+ }
+
+ def __init__(self, *, operating_system, **kwargs) -> None:
+ super(OSDiskImage, self).__init__(**kwargs)
+ self.operating_system = operating_system
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_py3.py
new file mode 100644
index 000000000000..fb52bdcd3e5b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_disk_py3.py
@@ -0,0 +1,89 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class OSDisk(Model):
+ """Specifies information about the operating system disk used by the virtual
+ machine.
For more information about disks, see [About disks and
+ VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes
+ :param encryption_settings: Specifies the encryption settings for the OS
+ Disk.
Minimum api-version: 2015-06-15
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2016_03_30.models.DiskEncryptionSettings
+ :param name: Required. The disk name.
+ :type name: str
+ :param vhd: Required. The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the name of the disk in a
+ virtual machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'vhd': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ }
+
+ def __init__(self, *, name: str, vhd, create_option, os_type=None, encryption_settings=None, image=None, caching=None, disk_size_gb: int=None, **kwargs) -> None:
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = os_type
+ self.encryption_settings = encryption_settings
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile.py
index 59bbafcb3c25..402a51fdb0ba 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile.py
@@ -88,12 +88,12 @@ class OSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(OSProfile, self).__init__()
- 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
+ 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/v2016_03_30/models/os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/os_profile_py3.py
new file mode 100644
index 000000000000..95126a01d37b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.WindowsConfiguration
+ :param linux_configuration: Specifies the Linux operating system settings
+ on the virtual machine.
For a list of supported Linux
+ distributions, see [Linux on Azure-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+
For running non-endorsed distributions, see [Information for
+ Non-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration
+ :param secrets: Specifies set of certificates that should be installed
+ onto the virtual machine.
+ :type secrets:
+ list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name': {'key': 'computerName', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(OSProfile, self).__init__(**kwargs)
+ self.computer_name = computer_name
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan.py
index 772160aef635..d42b6b32cfac 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan.py
@@ -38,9 +38,9 @@ class Plan(Model):
'promotion_code': {'key': 'promotionCode', 'type': 'str'},
}
- def __init__(self, name=None, publisher=None, product=None, promotion_code=None):
- super(Plan, self).__init__()
- self.name = name
- self.publisher = publisher
- self.product = product
- self.promotion_code = promotion_code
+ 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/v2016_03_30/models/plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/plan_py3.py
new file mode 100644
index 000000000000..9cca2c78a123
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/purchase_plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan.py
index aa29cb02ab78..2e1509addca6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan.py
@@ -16,12 +16,15 @@ class PurchasePlan(Model):
"""Used for establishing the purchase context of any 3rd Party artifact
through MarketPlace.
- :param publisher: The publisher ID.
+ All required parameters must be populated in order to send to Azure.
+
+ :param publisher: Required. The publisher ID.
:type publisher: str
- :param name: The plan ID.
+ :param name: Required. The plan ID.
:type name: str
- :param product: Specifies the product of the image from the marketplace.
- This is the same value as Offer under the imageReference element.
+ :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
"""
@@ -37,8 +40,8 @@ class PurchasePlan(Model):
'product': {'key': 'product', 'type': 'str'},
}
- def __init__(self, publisher, name, product):
- super(PurchasePlan, self).__init__()
- self.publisher = publisher
- self.name = name
- self.product = product
+ 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/v2016_03_30/models/purchase_plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/purchase_plan_py3.py
new file mode 100644
index 000000000000..26f7996f1633
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource.py
index 10269b591c68..5dd7d481c685 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource.py
@@ -18,13 +18,15 @@ class Resource(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -45,10 +47,10 @@ class Resource(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, location, tags=None):
- super(Resource, self).__init__()
+ def __init__(self, **kwargs):
+ super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
- self.location = location
- self.tags = tags
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/resource_py3.py
new file mode 100644
index 000000000000..2f3702caf609
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku.py
index 16755dc57b65..5c07709435e0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku.py
@@ -31,8 +31,8 @@ class Sku(Model):
'capacity': {'key': 'capacity', 'type': 'long'},
}
- def __init__(self, name=None, tier=None, capacity=None):
- super(Sku, self).__init__()
- self.name = name
- self.tier = tier
- self.capacity = capacity
+ 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/v2016_03_30/models/sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sku_py3.py
new file mode 100644
index 000000000000..f6bc74afaadc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/ssh_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration.py
index 9118faa234b5..395706d1acab 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration.py
@@ -25,6 +25,6 @@ class SshConfiguration(Model):
'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
}
- def __init__(self, public_keys=None):
- super(SshConfiguration, self).__init__()
- self.public_keys = public_keys
+ 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/v2016_03_30/models/ssh_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_configuration_py3.py
new file mode 100644
index 000000000000..3baef3ba47d6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.SshPublicKey]
+ """
+
+ _attribute_map = {
+ 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
+ }
+
+ def __init__(self, *, public_keys=None, **kwargs) -> None:
+ super(SshConfiguration, self).__init__(**kwargs)
+ self.public_keys = public_keys
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key.py
index 2fe6756641cb..122e0d3b9fdd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key.py
@@ -33,7 +33,7 @@ class SshPublicKey(Model):
'key_data': {'key': 'keyData', 'type': 'str'},
}
- def __init__(self, path=None, key_data=None):
- super(SshPublicKey, self).__init__()
- self.path = path
- self.key_data = key_data
+ 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/v2016_03_30/models/ssh_public_key_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/ssh_public_key_py3.py
new file mode 100644
index 000000000000..b16ee085b36b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile.py
index 729b6117b260..615d641cfba0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile.py
@@ -40,8 +40,8 @@ class StorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
}
- def __init__(self, image_reference=None, os_disk=None, data_disks=None):
- super(StorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
- self.data_disks = data_disks
+ 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/v2016_03_30/models/storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/storage_profile_py3.py
new file mode 100644
index 000000000000..8269e4309aa0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.ImageReference
+ :param os_disk: Specifies information about the operating system disk used
+ by the virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type os_disk: ~azure.mgmt.compute.v2016_03_30.models.OSDisk
+ :param data_disks: Specifies the parameters that are used to add a data
+ disk to a virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type data_disks: list[~azure.mgmt.compute.v2016_03_30.models.DataDisk]
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None:
+ super(StorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource.py
index b32875f54c8e..11e092cc6ff5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource.py
@@ -23,6 +23,6 @@ class SubResource(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(SubResource, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(SubResource, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/sub_resource_py3.py
new file mode 100644
index 000000000000..29e5afee38f9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy.py
index c5fa94054994..63a0f512d34c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy.py
@@ -28,6 +28,6 @@ class UpgradePolicy(Model):
'mode': {'key': 'mode', 'type': 'UpgradeMode'},
}
- def __init__(self, mode=None):
- super(UpgradePolicy, self).__init__()
- self.mode = mode
+ def __init__(self, **kwargs):
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = kwargs.get('mode', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy_py3.py
new file mode 100644
index 000000000000..a373104ad975
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/upgrade_policy_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 UpgradePolicy(Model):
+ """Describes an upgrade policy - automatic or manual.
+
+ :param mode: Specifies the mode of an upgrade to virtual machines in the
+ scale set.
Possible values are:
**Manual** - You
+ control the application of updates to virtual machines in the scale set.
+ You do this by using the manualUpgrade action.
**Automatic** -
+ All virtual machines in the scale set are automatically updated at the
+ same time. Possible values include: 'Automatic', 'Manual'
+ :type mode: str or ~azure.mgmt.compute.v2016_03_30.models.UpgradeMode
+ """
+
+ _attribute_map = {
+ 'mode': {'key': 'mode', 'type': 'UpgradeMode'},
+ }
+
+ def __init__(self, *, mode=None, **kwargs) -> None:
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = mode
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage.py
index df47b2b4eee2..23badd7cd3dc 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage.py
@@ -18,14 +18,16 @@ class Usage(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
- :ivar unit: An enum describing the unit of usage measurement. Default
- value: "Count" .
+ 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: The current usage of the resource.
+ :param current_value: Required. The current usage of the resource.
:type current_value: int
- :param limit: The maximum permitted usage of the resource.
+ :param limit: Required. The maximum permitted usage of the resource.
:type limit: long
- :param name: The name of the type of usage.
+ :param name: Required. The name of the type of usage.
:type name: ~azure.mgmt.compute.v2016_03_30.models.UsageName
"""
@@ -45,8 +47,8 @@ class Usage(Model):
unit = "Count"
- def __init__(self, current_value, limit, name):
- super(Usage, self).__init__()
- self.current_value = current_value
- self.limit = limit
- self.name = name
+ 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/v2016_03_30/models/usage_name.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name.py
index 799c1f896da3..e2560936493e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name.py
@@ -26,7 +26,7 @@ class UsageName(Model):
'localized_value': {'key': 'localizedValue', 'type': 'str'},
}
- def __init__(self, value=None, localized_value=None):
- super(UsageName, self).__init__()
- self.value = value
- self.localized_value = localized_value
+ 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/v2016_03_30/models/usage_name_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_name_py3.py
new file mode 100644
index 000000000000..ad0b77459f75
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/usage_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_py3.py
new file mode 100644
index 000000000000..f72ece5f6adc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.UsageName
+ """
+
+ _validation = {
+ 'unit': {'required': True, 'constant': True},
+ 'current_value': {'required': True},
+ 'limit': {'required': True},
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'unit': {'key': 'unit', 'type': 'str'},
+ 'current_value': {'key': 'currentValue', 'type': 'int'},
+ 'limit': {'key': 'limit', 'type': 'long'},
+ 'name': {'key': 'name', 'type': 'UsageName'},
+ }
+
+ unit = "Count"
+
+ def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None:
+ super(Usage, self).__init__(**kwargs)
+ self.current_value = current_value
+ self.limit = limit
+ self.name = name
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate.py
index 8d4d05955de4..b173def6f820 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate.py
@@ -40,7 +40,7 @@ class VaultCertificate(Model):
'certificate_store': {'key': 'certificateStore', 'type': 'str'},
}
- def __init__(self, certificate_url=None, certificate_store=None):
- super(VaultCertificate, self).__init__()
- self.certificate_url = certificate_url
- self.certificate_store = certificate_store
+ 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/v2016_03_30/models/vault_certificate_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_certificate_py3.py
new file mode 100644
index 000000000000..eda5ba1c3f1d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/vault_secret_group.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group.py
index 5a20bd24b0f9..4ac926d6bfce 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group.py
@@ -29,7 +29,7 @@ class VaultSecretGroup(Model):
'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
}
- def __init__(self, source_vault=None, vault_certificates=None):
- super(VaultSecretGroup, self).__init__()
- self.source_vault = source_vault
- self.vault_certificates = vault_certificates
+ 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/v2016_03_30/models/vault_secret_group_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/vault_secret_group_py3.py
new file mode 100644
index 000000000000..2c5ed2bc445f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.SubResource
+ :param vault_certificates: The list of key vault references in SourceVault
+ which contain certificates.
+ :type vault_certificates:
+ list[~azure.mgmt.compute.v2016_03_30.models.VaultCertificate]
+ """
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
+ }
+
+ def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None:
+ super(VaultSecretGroup, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.vault_certificates = vault_certificates
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk.py
index af1725d302af..5e3ad9dea7d4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk.py
@@ -23,6 +23,6 @@ class VirtualHardDisk(Model):
'uri': {'key': 'uri', 'type': 'str'},
}
- def __init__(self, uri=None):
- super(VirtualHardDisk, self).__init__()
- self.uri = uri
+ def __init__(self, **kwargs):
+ super(VirtualHardDisk, self).__init__(**kwargs)
+ self.uri = kwargs.get('uri', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_hard_disk_py3.py
new file mode 100644
index 000000000000..9c069b95f084
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/virtual_machine.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine.py
index 219504cd411f..d29189e2bbdd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine.py
@@ -18,13 +18,15 @@ class VirtualMachine(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -127,18 +129,18 @@ class VirtualMachine(Resource):
'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'},
}
- def __init__(self, location, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type=None, identity=None):
- super(VirtualMachine, self).__init__(location=location, tags=tags)
- 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
+ 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 = license_type
+ self.license_type = kwargs.get('license_type', None)
self.vm_id = None
self.resources = None
- self.identity = identity
+ self.identity = kwargs.get('identity', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view.py
index 9b7a049d113d..f494261e2b6d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view.py
@@ -32,8 +32,8 @@ class VirtualMachineAgentInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, vm_agent_version=None, extension_handlers=None, statuses=None):
- super(VirtualMachineAgentInstanceView, self).__init__()
- self.vm_agent_version = vm_agent_version
- self.extension_handlers = extension_handlers
- self.statuses = statuses
+ 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/v2016_03_30/models/virtual_machine_agent_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_agent_instance_view_py3.py
new file mode 100644
index 000000000000..fae6ce1c0a9f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.VirtualMachineExtensionHandlerInstanceView]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'},
+ 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineAgentInstanceView, self).__init__(**kwargs)
+ self.vm_agent_version = vm_agent_version
+ self.extension_handlers = extension_handlers
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters.py
index b406f387ffed..4e6ffbea7a4f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters.py
@@ -15,12 +15,15 @@
class VirtualMachineCaptureParameters(Model):
"""Capture Virtual Machine parameters.
- :param vhd_prefix: The captured virtual hard disk's name prefix.
+ 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: The destination container name.
+ :param destination_container_name: Required. The destination container
+ name.
:type destination_container_name: str
- :param overwrite_vhds: Specifies whether to overwrite the destination
- virtual hard disk, in case of conflict.
+ :param overwrite_vhds: Required. Specifies whether to overwrite the
+ destination virtual hard disk, in case of conflict.
:type overwrite_vhds: bool
"""
@@ -36,8 +39,8 @@ class VirtualMachineCaptureParameters(Model):
'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'},
}
- def __init__(self, vhd_prefix, destination_container_name, overwrite_vhds):
- super(VirtualMachineCaptureParameters, self).__init__()
- self.vhd_prefix = vhd_prefix
- self.destination_container_name = destination_container_name
- self.overwrite_vhds = overwrite_vhds
+ 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/v2016_03_30/models/virtual_machine_capture_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_parameters_py3.py
new file mode 100644
index 000000000000..1866cdc23300
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/virtual_machine_capture_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result.py
index 95e26a427e83..2b0df7406a34 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result.py
@@ -26,6 +26,6 @@ class VirtualMachineCaptureResult(SubResource):
'output': {'key': 'properties.output', 'type': 'object'},
}
- def __init__(self, id=None, output=None):
- super(VirtualMachineCaptureResult, self).__init__(id=id)
- self.output = output
+ def __init__(self, **kwargs):
+ super(VirtualMachineCaptureResult, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
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
new file mode 100644
index 000000000000..da449b8e9154
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_capture_result_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 .sub_resource import SubResource
+
+
+class VirtualMachineCaptureResult(SubResource):
+ """Resource Id.
+
+ :param id: Resource Id
+ :type id: str
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'output': {'key': 'properties.output', 'type': 'object'},
+ }
+
+ def __init__(self, *, id: str=None, output=None, **kwargs) -> None:
+ super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension.py
index 4f5ab4e8bd1c..5bd629a0f880 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension.py
@@ -18,13 +18,15 @@ class VirtualMachineExtension(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -82,14 +84,14 @@ class VirtualMachineExtension(Resource):
'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
}
- def __init__(self, location, tags=None, force_update_tag=None, publisher=None, virtual_machine_extension_type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None, instance_view=None):
- super(VirtualMachineExtension, self).__init__(location=location, tags=tags)
- 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
+ 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 = instance_view
+ self.instance_view = kwargs.get('instance_view', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view.py
index c1ebc96715eb..796327c6e98c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view.py
@@ -30,8 +30,8 @@ class VirtualMachineExtensionHandlerInstanceView(Model):
'status': {'key': 'status', 'type': 'InstanceViewStatus'},
}
- def __init__(self, type=None, type_handler_version=None, status=None):
- super(VirtualMachineExtensionHandlerInstanceView, self).__init__()
- self.type = type
- self.type_handler_version = type_handler_version
- self.status = status
+ 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/v2016_03_30/models/virtual_machine_extension_handler_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_handler_instance_view_py3.py
new file mode 100644
index 000000000000..0c9a6da30f09
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.InstanceViewStatus
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'InstanceViewStatus'},
+ }
+
+ def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None:
+ super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs)
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.status = status
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image.py
index 7614699a78da..7273e2b84754 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_image.py
@@ -18,23 +18,26 @@ class VirtualMachineExtensionImage(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
- :param operating_system: The operating system this extension supports.
- :type operating_system: str
- :param compute_role: The type of role (IaaS or PaaS) this extension
+ :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: The schema defined by publisher, where extension
- consumers should provide settings in a matching schema.
+ :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
@@ -69,10 +72,10 @@ class VirtualMachineExtensionImage(Resource):
'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'},
}
- def __init__(self, location, operating_system, compute_role, handler_schema, tags=None, vm_scale_set_enabled=None, supports_multiple_extensions=None):
- super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags)
- 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
+ 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/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
new file mode 100644
index 000000000000..217accab02f0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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 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/v2016_03_30/models/virtual_machine_extension_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view.py
index c16a59dce81c..20404ccc1f2e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view.py
@@ -38,10 +38,10 @@ class VirtualMachineExtensionInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, type=None, type_handler_version=None, substatuses=None, statuses=None):
- super(VirtualMachineExtensionInstanceView, self).__init__()
- self.name = name
- self.type = type
- self.type_handler_version = type_handler_version
- self.substatuses = substatuses
- self.statuses = statuses
+ 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/v2016_03_30/models/virtual_machine_extension_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_extension_instance_view_py3.py
new file mode 100644
index 000000000000..6075f76cb1ca
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.InstanceViewStatus]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.substatuses = substatuses
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..32c448ecd2c2
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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 import Resource
+
+
+class VirtualMachineExtension(Resource):
+ """Describes a Virtual Machine Extension.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param force_update_tag: How the extension handler should be forced to
+ update even if the extension configuration has not changed.
+ :type force_update_tag: str
+ :param publisher: The name of the extension handler publisher.
+ :type publisher: str
+ :param virtual_machine_extension_type: Specifies the type of the
+ extension; an example is "CustomScriptExtension".
+ :type virtual_machine_extension_type: str
+ :param type_handler_version: Specifies the version of the script handler.
+ :type type_handler_version: str
+ :param auto_upgrade_minor_version: Indicates whether the extension should
+ use a newer minor version if one is available at deployment time. Once
+ deployed, however, the extension will not upgrade minor versions unless
+ redeployed, even with this property set to true.
+ :type auto_upgrade_minor_version: bool
+ :param settings: Json formatted public settings for the extension.
+ :type settings: object
+ :param protected_settings: The extension can contain either
+ protectedSettings or protectedSettingsFromKeyVault or no protected
+ settings at all.
+ :type protected_settings: object
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param instance_view: The virtual machine extension instance view.
+ :type instance_view:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
+ 'publisher': {'key': 'properties.publisher', 'type': 'str'},
+ 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'},
+ 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'},
+ 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'},
+ 'settings': {'key': 'properties.settings', 'type': 'object'},
+ 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
+ }
+
+ def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None:
+ super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs)
+ self.force_update_tag = force_update_tag
+ self.publisher = publisher
+ self.virtual_machine_extension_type = virtual_machine_extension_type
+ self.type_handler_version = type_handler_version
+ self.auto_upgrade_minor_version = auto_upgrade_minor_version
+ self.settings = settings
+ self.protected_settings = protected_settings
+ self.provisioning_state = None
+ self.instance_view = instance_view
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity.py
index 4c0081f10876..ec2f505a0ee6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity.py
@@ -40,8 +40,8 @@ class VirtualMachineIdentity(Model):
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
}
- def __init__(self, type=None):
- super(VirtualMachineIdentity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
- self.type = type
+ self.type = kwargs.get('type', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity_py3.py
new file mode 100644
index 000000000000..9db47247e9e5
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_identity_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 VirtualMachineIdentity(Model):
+ """Identity for the virtual machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of virtual machine identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id associated with the virtual machine.
+ :vartype tenant_id: str
+ :param type: The type of identity used for the virtual machine. Currently,
+ the only supported type is 'SystemAssigned', which implicitly creates an
+ identity. Possible values include: 'SystemAssigned'
+ :type type: str or
+ ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ResourceIdentityType'},
+ }
+
+ def __init__(self, *, type=None, **kwargs) -> None:
+ super(VirtualMachineIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image.py
index e7172b356d04..4ddf3a23c29c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -50,8 +52,8 @@ class VirtualMachineImage(VirtualMachineImageResource):
'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
}
- def __init__(self, name, location, id=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None):
- super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags)
- self.plan = plan
- self.os_disk_image = os_disk_image
- self.data_disk_images = data_disk_images
+ 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/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
new file mode 100644
index 000000000000..efc8c3d8394e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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 import VirtualMachineImageResource
+
+
+class VirtualMachineImage(VirtualMachineImageResource):
+ """Describes a Virtual Machine Image.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The name of the resource.
+ :type name: str
+ :param location: Required. The supported Azure location of the resource.
+ :type location: str
+ :param tags: Specifies the tags that are assigned to the virtual machine.
+ For more information about using tags, see [Using tags to organize your
+ Azure
+ resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
+ :type tags: dict[str, str]
+ :param plan:
+ :type plan: ~azure.mgmt.compute.v2016_03_30.models.PurchasePlan
+ :param os_disk_image:
+ :type os_disk_image: ~azure.mgmt.compute.v2016_03_30.models.OSDiskImage
+ :param data_disk_images:
+ :type data_disk_images:
+ list[~azure.mgmt.compute.v2016_03_30.models.DataDiskImage]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'},
+ 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'},
+ 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
+ }
+
+ def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None:
+ super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs)
+ self.plan = plan
+ self.os_disk_image = os_disk_image
+ self.data_disk_images = data_disk_images
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource.py
index a7029041061d..8807cc8f391b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_image_resource.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -40,8 +42,8 @@ class VirtualMachineImageResource(SubResource):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, name, location, id=None, tags=None):
- super(VirtualMachineImageResource, self).__init__(id=id)
- self.name = name
- self.location = location
- self.tags = tags
+ 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/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
new file mode 100644
index 000000000000..48a968bf2fbf
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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 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/v2016_03_30/models/virtual_machine_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view.py
index 5f671e0c6042..966d3f09f313 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view.py
@@ -54,13 +54,13 @@ class VirtualMachineInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None):
- super(VirtualMachineInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.disks = disks
- self.extensions = extensions
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
+ self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view_py3.py
new file mode 100644
index 000000000000..ab733f0a765d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_instance_view_py3.py
@@ -0,0 +1,66 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineInstanceView(Model):
+ """The instance view of a virtual machine.
+
+ :param platform_update_domain: Specifies the update domain of the virtual
+ machine.
+ :type platform_update_domain: int
+ :param platform_fault_domain: Specifies the fault domain of the virtual
+ machine.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView
+ :param disks: The virtual machine disk information.
+ :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView]
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2016_03_30.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.disks = disks
+ self.extensions = extensions
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..4348f94e375d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_py3.py
@@ -0,0 +1,146 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class VirtualMachine(Resource):
+ """Describes a Virtual Machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2016_03_30.models.SubResource
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineInstanceView
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier
+ that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read
+ using platform BIOS commands.
+ :vartype vm_id: str
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]
+ :param identity: The identity of the virtual machine, if configured.
+ :type identity:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineIdentity
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'vm_id': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'plan', 'type': 'Plan'},
+ 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'},
+ 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'},
+ 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'},
+ 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'},
+ 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'},
+ 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'},
+ 'license_type': {'key': 'properties.licenseType', 'type': 'str'},
+ 'vm_id': {'key': 'properties.vmId', 'type': 'str'},
+ 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
+ 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'},
+ }
+
+ def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, **kwargs) -> None:
+ super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs)
+ self.plan = plan
+ self.hardware_profile = hardware_profile
+ self.storage_profile = storage_profile
+ self.os_profile = os_profile
+ self.network_profile = network_profile
+ self.diagnostics_profile = diagnostics_profile
+ self.availability_set = availability_set
+ self.provisioning_state = None
+ self.instance_view = None
+ self.license_type = license_type
+ self.vm_id = None
+ self.resources = None
+ self.identity = identity
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set.py
index c507f89db3f1..3cffa82b94ac 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -69,11 +71,11 @@ class VirtualMachineScaleSet(Resource):
'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
}
- def __init__(self, location, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, over_provision=None, identity=None):
- super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags)
- self.sku = sku
- self.upgrade_policy = upgrade_policy
- self.virtual_machine_profile = virtual_machine_profile
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSet, self).__init__(**kwargs)
+ self.sku = kwargs.get('sku', None)
+ self.upgrade_policy = kwargs.get('upgrade_policy', None)
+ self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None)
self.provisioning_state = None
- self.over_provision = over_provision
- self.identity = identity
+ self.over_provision = kwargs.get('over_provision', None)
+ self.identity = kwargs.get('identity', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension.py
index 2c7514755033..d6d8b5fbc51e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension.py
@@ -57,13 +57,13 @@ class VirtualMachineScaleSetExtension(SubResource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, id=None, name=None, publisher=None, type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None):
- super(VirtualMachineScaleSetExtension, self).__init__(id=id)
- self.name = name
- self.publisher = publisher
- self.type = type
- self.type_handler_version = type_handler_version
- self.auto_upgrade_minor_version = auto_upgrade_minor_version
- self.settings = settings
- self.protected_settings = protected_settings
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetExtension, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.publisher = kwargs.get('publisher', None)
+ self.type = kwargs.get('type', None)
+ self.type_handler_version = kwargs.get('type_handler_version', None)
+ self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None)
+ self.settings = kwargs.get('settings', None)
+ self.protected_settings = kwargs.get('protected_settings', None)
self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile.py
index c4ed4350040a..ca232d3aa7d0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetExtensionProfile(Model):
'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
}
- def __init__(self, extensions=None):
- super(VirtualMachineScaleSetExtensionProfile, self).__init__()
- self.extensions = extensions
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = kwargs.get('extensions', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_profile_py3.py
new file mode 100644
index 000000000000..a2e63570c6a2
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.VirtualMachineScaleSetExtension]
+ """
+
+ _attribute_map = {
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
+ }
+
+ def __init__(self, *, extensions=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = extensions
diff --git a/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
new file mode 100644
index 000000000000..5523e0444c59
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_extension_py3.py
@@ -0,0 +1,69 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .sub_resource import SubResource
+
+
+class VirtualMachineScaleSetExtension(SubResource):
+ """Describes a Virtual Machine Scale Set Extension.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: The name of the extension.
+ :type name: str
+ :param publisher: The name of the extension handler publisher.
+ :type publisher: str
+ :param type: The type of the extension handler.
+ :type type: str
+ :param type_handler_version: The type version of the extension handler.
+ :type type_handler_version: str
+ :param auto_upgrade_minor_version: Whether the extension handler should be
+ automatically upgraded across minor versions.
+ :type auto_upgrade_minor_version: bool
+ :param settings: Json formatted public settings for the extension.
+ :type settings: object
+ :param protected_settings: Json formatted protected settings for the
+ extension.
+ :type protected_settings: object
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'publisher': {'key': 'properties.publisher', 'type': 'str'},
+ 'type': {'key': 'properties.type', 'type': 'str'},
+ 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'},
+ 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'},
+ 'settings': {'key': 'properties.settings', 'type': 'object'},
+ 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, id: str=None, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetExtension, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.publisher = publisher
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.auto_upgrade_minor_version = auto_upgrade_minor_version
+ self.settings = settings
+ self.protected_settings = protected_settings
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity.py
index 66c70f6a6106..18c86a5f890d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity.py
@@ -42,8 +42,8 @@ class VirtualMachineScaleSetIdentity(Model):
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
}
- def __init__(self, type=None):
- super(VirtualMachineScaleSetIdentity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
- self.type = type
+ self.type = kwargs.get('type', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity_py3.py
new file mode 100644
index 000000000000..fe82aa5fe3e1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_identity_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 VirtualMachineScaleSetIdentity(Model):
+ """Identity for the virtual machine scale set.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of virtual machine scale set
+ identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id associated with the virtual machine scale
+ set.
+ :vartype tenant_id: str
+ :param type: The type of identity used for the virtual machine scale set.
+ Currently, the only supported type is 'SystemAssigned', which implicitly
+ creates an identity. Possible values include: 'SystemAssigned'
+ :type type: str or
+ ~azure.mgmt.compute.v2016_03_30.models.ResourceIdentityType
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ResourceIdentityType'},
+ }
+
+ def __init__(self, *, type=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view.py
index 82dbb90ac32f..b53997afdf79 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view.py
@@ -41,8 +41,8 @@ class VirtualMachineScaleSetInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, statuses=None):
- super(VirtualMachineScaleSetInstanceView, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
self.virtual_machine = None
self.extensions = None
- self.statuses = statuses
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_py3.py
new file mode 100644
index 000000000000..26ad90384c8d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary
+ :ivar extensions: The extensions information.
+ :vartype extensions:
+ list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMExtensionsSummary]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus]
+ """
+
+ _validation = {
+ 'virtual_machine': {'readonly': True},
+ 'extensions': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, statuses=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
+ self.virtual_machine = None
+ self.extensions = None
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py
index f7e4d9ba77ba..a02855aae1ce 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py
@@ -32,6 +32,6 @@ class VirtualMachineScaleSetInstanceViewStatusesSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py
new file mode 100644
index 000000000000..0f6ca9b8d18b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration.py
index c491877fb162..ec56a9fc5174 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration.py
@@ -15,11 +15,13 @@
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: The IP configuration name.
+ :param name: Required. The IP configuration name.
:type name: str
- :param subnet: The subnet.
+ :param subnet: Required. The subnet.
:type subnet: ~azure.mgmt.compute.v2016_03_30.models.ApiEntityReference
:param application_gateway_backend_address_pools: The application gateway
backend address pools.
@@ -49,10 +51,10 @@ class VirtualMachineScaleSetIPConfiguration(SubResource):
'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
}
- def __init__(self, name, subnet, id=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None):
- super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id)
- self.name = name
- self.subnet = subnet
- self.application_gateway_backend_address_pools = application_gateway_backend_address_pools
- self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
- self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.subnet = kwargs.get('subnet', None)
+ self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None)
+ self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None)
+ self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None)
diff --git a/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
new file mode 100644
index 000000000000..4e2c36c30e6c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_ip_configuration_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 .sub_resource import SubResource
+
+
+class VirtualMachineScaleSetIPConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's IP configuration.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The IP configuration name.
+ :type name: str
+ :param subnet: Required. The subnet.
+ :type subnet: ~azure.mgmt.compute.v2016_03_30.models.ApiEntityReference
+ :param application_gateway_backend_address_pools: The application gateway
+ backend address pools.
+ :type application_gateway_backend_address_pools:
+ list[~azure.mgmt.compute.v2016_03_30.models.SubResource]
+ :param load_balancer_backend_address_pools: The load balancer backend
+ address pools.
+ :type load_balancer_backend_address_pools:
+ list[~azure.mgmt.compute.v2016_03_30.models.SubResource]
+ :param load_balancer_inbound_nat_pools: The load balancer inbound nat
+ pools.
+ :type load_balancer_inbound_nat_pools:
+ list[~azure.mgmt.compute.v2016_03_30.models.SubResource]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'subnet': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'},
+ 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
+ }
+
+ def __init__(self, *, name: str, subnet, id: str=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.subnet = subnet
+ self.application_gateway_backend_address_pools = application_gateway_backend_address_pools
+ self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
+ self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration.py
index 158db0734e45..b59219ffebb9 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration.py
@@ -16,13 +16,16 @@ 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: The network configuration name.
+ :param name: Required. The network configuration name.
:type name: str
:param primary: Whether this is a primary NIC on a virtual machine.
:type primary: bool
- :param ip_configurations: The virtual machine scale set IP Configuration.
+ :param ip_configurations: Required. The virtual machine scale set IP
+ Configuration.
:type ip_configurations:
list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIPConfiguration]
"""
@@ -39,8 +42,8 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource):
'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
}
- def __init__(self, name, ip_configurations, id=None, primary=None):
- super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id)
- self.name = name
- self.primary = primary
- self.ip_configurations = ip_configurations
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.primary = kwargs.get('primary', None)
+ self.ip_configurations = kwargs.get('ip_configurations', None)
diff --git a/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
new file mode 100644
index 000000000000..1d82ed5e0c03
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_configuration_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 import SubResource
+
+
+class VirtualMachineScaleSetNetworkConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's network
+ configurations.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The network configuration name.
+ :type name: str
+ :param primary: Whether this is a primary NIC on a virtual machine.
+ :type primary: bool
+ :param ip_configurations: Required. The virtual machine scale set IP
+ Configuration.
+ :type ip_configurations:
+ list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIPConfiguration]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'ip_configurations': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'primary': {'key': 'properties.primary', 'type': 'bool'},
+ 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
+ }
+
+ def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.primary = primary
+ self.ip_configurations = ip_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile.py
index eb3c53fd9407..66972cf23634 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetNetworkProfile(Model):
'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
}
- def __init__(self, network_interface_configurations=None):
- super(VirtualMachineScaleSetNetworkProfile, self).__init__()
- self.network_interface_configurations = network_interface_configurations
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs)
+ self.network_interface_configurations = kwargs.get('network_interface_configurations', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_network_profile_py3.py
new file mode 100644
index 000000000000..f4803bf1c4b1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_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 VirtualMachineScaleSetNetworkProfile(Model):
+ """Describes a virtual machine scale set network profile.
+
+ :param network_interface_configurations: The list of network
+ configurations.
+ :type network_interface_configurations:
+ list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkConfiguration]
+ """
+
+ _attribute_map = {
+ 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
+ }
+
+ def __init__(self, *, network_interface_configurations=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs)
+ self.network_interface_configurations = network_interface_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk.py
index 05462b041d1a..d46a87626736 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk.py
@@ -15,20 +15,22 @@
class VirtualMachineScaleSetOSDisk(Model):
"""Describes a virtual machine scale set operating system disk.
- :param name: The disk name.
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. The disk name.
:type name: str
:param caching: Specifies the caching requirements.
Possible
values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes
- :param create_option: 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'
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes
:param os_type: This property allows you to specify the type of the OS
@@ -59,11 +61,11 @@ class VirtualMachineScaleSetOSDisk(Model):
'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
}
- def __init__(self, name, create_option, caching=None, os_type=None, image=None, vhd_containers=None):
- super(VirtualMachineScaleSetOSDisk, self).__init__()
- self.name = name
- self.caching = caching
- self.create_option = create_option
- self.os_type = os_type
- self.image = image
- self.vhd_containers = vhd_containers
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.os_type = kwargs.get('os_type', None)
+ self.image = kwargs.get('image', None)
+ self.vhd_containers = kwargs.get('vhd_containers', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk_py3.py
new file mode 100644
index 000000000000..b15221f79080
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_disk_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 msrest.serialization import Model
+
+
+class VirtualMachineScaleSetOSDisk(Model):
+ """Describes a virtual machine scale set operating system disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. The disk name.
+ :type name: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2016_03_30.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_03_30.models.DiskCreateOptionTypes
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_03_30.models.OperatingSystemTypes
+ :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk
+ will be copied before using it to attach to the Virtual Machine. If
+ SourceImage is provided, the destination VirtualHardDisk should not exist.
+ :type image: ~azure.mgmt.compute.v2016_03_30.models.VirtualHardDisk
+ :param vhd_containers: The list of virtual hard disk container uris.
+ :type vhd_containers: list[str]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
+ }
+
+ def __init__(self, *, name: str, create_option, caching=None, os_type=None, image=None, vhd_containers=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = name
+ self.caching = caching
+ self.create_option = create_option
+ self.os_type = os_type
+ self.image = image
+ self.vhd_containers = vhd_containers
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile.py
index 77a9022df536..efdda7ad7bb3 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile.py
@@ -73,12 +73,12 @@ class VirtualMachineScaleSetOSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name_prefix=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(VirtualMachineScaleSetOSProfile, self).__init__()
- 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
+ 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/v2016_03_30/models/virtual_machine_scale_set_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile_py3.py
new file mode 100644
index 000000000000..6ee3b78e7df4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_os_profile_py3.py
@@ -0,0 +1,84 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetOSProfile(Model):
+ """Describes a virtual machine scale set OS profile.
+
+ :param computer_name_prefix: Specifies the computer name prefix for all of
+ the virtual machines in the scale set. Computer name prefixes must be 1 to
+ 15 characters long.
+ :type computer_name_prefix: str
+ :param admin_username: Specifies the name of the administrator account.
+
**Windows-only restriction:** Cannot end in "."
+ **Disallowed values:** "administrator", "admin", "user", "user1", "test",
+ "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm",
+ "admin2", "aspnet", "backup", "console", "david", "guest", "john",
+ "owner", "root", "server", "sql", "support", "support_388945a0", "sys",
+ "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1
+ character
**Max-length (Linux):** 64 characters
+ **Max-length (Windows):** 20 characters
For root access to
+ the Linux VM, see [Using root privileges on Linux virtual machines in
+ Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ For a list of built-in system users on Linux that should not be used in
+ this field, see [Selecting User Names for Linux on
+ Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ :type admin_username: str
+ :param admin_password: Specifies the password of the administrator
+ account.
**Minimum-length (Windows):** 8 characters
+ **Minimum-length (Linux):** 6 characters
**Max-length
+ (Windows):** 123 characters
**Max-length (Linux):** 72 characters
+
**Complexity requirements:** 3 out of 4 conditions below need to
+ be fulfilled
Has lower characters
Has upper characters
Has a
+ digit
Has a special character (Regex match [\\W_])
+ **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123",
+ "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
+ "iloveyou!"
For resetting the password, see [How to reset the
+ Remote Desktop service or its login password in a Windows
+ VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
For resetting root password, see [Manage users, SSH, and check or
+ repair disks on Azure Linux VMs using the VMAccess
+ Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
+ :type admin_password: str
+ :param custom_data: A base-64 encoded string of custom data.
+ :type custom_data: str
+ :param windows_configuration: The Windows Configuration of the OS profile.
+ :type windows_configuration:
+ ~azure.mgmt.compute.v2016_03_30.models.WindowsConfiguration
+ :param linux_configuration: The Linux Configuration of the OS profile.
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2016_03_30.models.LinuxConfiguration
+ :param secrets: The List of certificates for addition to the VM.
+ :type secrets:
+ list[~azure.mgmt.compute.v2016_03_30.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs)
+ self.computer_name_prefix = computer_name_prefix
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/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
new file mode 100644
index 000000000000..5ca8108adb6e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_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 import Resource
+
+
+class VirtualMachineScaleSet(Resource):
+ """Describes a Virtual Machine Scale Set.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku: The virtual machine scale set sku.
+ :type sku: ~azure.mgmt.compute.v2016_03_30.models.Sku
+ :param upgrade_policy: The upgrade policy.
+ :type upgrade_policy: ~azure.mgmt.compute.v2016_03_30.models.UpgradePolicy
+ :param virtual_machine_profile: The virtual machine profile.
+ :type virtual_machine_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMProfile
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param over_provision: Specifies whether the Virtual Machine Scale Set
+ should be overprovisioned.
+ :type over_provision: bool
+ :param identity: The identity of the virtual machine scale set, if
+ configured.
+ :type identity:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetIdentity
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'},
+ 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'},
+ 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
+ }
+
+ def __init__(self, *, location: str, tags=None, sku=None, upgrade_policy=None, virtual_machine_profile=None, over_provision: bool=None, identity=None, **kwargs) -> None:
+ super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs)
+ self.sku = sku
+ self.upgrade_policy = upgrade_policy
+ self.virtual_machine_profile = virtual_machine_profile
+ self.provisioning_state = None
+ self.over_provision = over_provision
+ self.identity = identity
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku.py
index 3d9534f20bc4..7870d03c9144 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku.py
@@ -39,8 +39,8 @@ class VirtualMachineScaleSetSku(Model):
'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSku, self).__init__()
+ 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/v2016_03_30/models/virtual_machine_scale_set_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity.py
index a160a672047c..fd3c4449f76b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity.py
@@ -44,8 +44,8 @@ class VirtualMachineScaleSetSkuCapacity(Model):
'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSkuCapacity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
self.minimum = None
self.maximum = None
self.default_capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py
new file mode 100644
index 000000000000..f69668581e71
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.VirtualMachineScaleSetSkuScaleType
+ """
+
+ _validation = {
+ 'minimum': {'readonly': True},
+ 'maximum': {'readonly': True},
+ 'default_capacity': {'readonly': True},
+ 'scale_type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'minimum': {'key': 'minimum', 'type': 'long'},
+ 'maximum': {'key': 'maximum', 'type': 'long'},
+ 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'},
+ 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
+ self.minimum = None
+ self.maximum = None
+ self.default_capacity = None
+ self.scale_type = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_sku_py3.py
new file mode 100644
index 000000000000..8bab11cf5910
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.Sku
+ :ivar capacity: Specifies the number of virtual machines in the scale set.
+ :vartype capacity:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetSkuCapacity
+ """
+
+ _validation = {
+ 'resource_type': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'capacity': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSku, self).__init__(**kwargs)
+ self.resource_type = None
+ self.sku = None
+ self.capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile.py
index 6d6ab265fb7d..ec2bc832d477 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile.py
@@ -28,7 +28,7 @@ class VirtualMachineScaleSetStorageProfile(Model):
'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'},
}
- def __init__(self, image_reference=None, os_disk=None):
- super(VirtualMachineScaleSetStorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs)
+ self.image_reference = kwargs.get('image_reference', None)
+ self.os_disk = kwargs.get('os_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_profile_py3.py
new file mode 100644
index 000000000000..01272beb4a42
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_storage_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 VirtualMachineScaleSetStorageProfile(Model):
+ """Describes a virtual machine scale set storage profile.
+
+ :param image_reference: The image reference.
+ :type image_reference:
+ ~azure.mgmt.compute.v2016_03_30.models.ImageReference
+ :param os_disk: The OS disk.
+ :type os_disk:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSDisk
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm.py
index 119a9fcb0363..5aeb889909f7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSetVM(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -134,20 +136,20 @@ class VirtualMachineScaleSetVM(Resource):
'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
}
- def __init__(self, location, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type=None, plan=None):
- super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags)
+ 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 = 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.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 = license_type
- self.plan = plan
+ 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/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py
index 4e52ba4a86ef..a67869d9af84 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py
@@ -35,7 +35,7 @@ class VirtualMachineScaleSetVMExtensionsSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__()
+ 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/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py
new file mode 100644
index 000000000000..fe4804644f68
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs)
+ self.name = None
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids.py
index 681ab449f3f2..772c66dad326 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetVMInstanceIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids=None):
- super(VirtualMachineScaleSetVMInstanceIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2016_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/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/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py
index 2a35798001fa..ece250dd4fd4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py
@@ -15,7 +15,9 @@
class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
"""Specifies a list of virtual machine instance IDs from the VM scale set.
- :param instance_ids: The virtual machine scale set instance ids.
+ 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]
"""
@@ -27,6 +29,6 @@ class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids):
- super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2016_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/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/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view.py
index 8859c80a8d64..a99cbc4d022d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view.py
@@ -52,13 +52,13 @@ class VirtualMachineScaleSetVMInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None):
- super(VirtualMachineScaleSetVMInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.disks = disks
- self.extensions = extensions
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
+ self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py
new file mode 100644
index 000000000000..9cc3a0c3b2be
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py
@@ -0,0 +1,64 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetVMInstanceView(Model):
+ """The instance view of a virtual machine scale set VM.
+
+ :param platform_update_domain: The Update Domain count.
+ :type platform_update_domain: int
+ :param platform_fault_domain: The Fault Domain count.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineAgentInstanceView
+ :param disks: The disks information.
+ :type disks: list[~azure.mgmt.compute.v2016_03_30.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionInstanceView]
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2016_03_30.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.disks = disks
+ self.extensions = extensions
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile.py
index 302627aed764..a598ca7a29ac 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile.py
@@ -36,9 +36,9 @@ class VirtualMachineScaleSetVMProfile(Model):
'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
}
- def __init__(self, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None):
- super(VirtualMachineScaleSetVMProfile, self).__init__()
- self.os_profile = os_profile
- self.storage_profile = storage_profile
- self.network_profile = network_profile
- self.extension_profile = extension_profile
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = kwargs.get('os_profile', None)
+ self.storage_profile = kwargs.get('storage_profile', None)
+ self.network_profile = kwargs.get('network_profile', None)
+ self.extension_profile = kwargs.get('extension_profile', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile_py3.py
new file mode 100644
index 000000000000..485d1a7c83cb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_vm_profile_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 VirtualMachineScaleSetVMProfile(Model):
+ """Describes a virtual machine scale set virtual machine profile.
+
+ :param os_profile: The virtual machine scale set OS profile.
+ :type os_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetOSProfile
+ :param storage_profile: The virtual machine scale set storage profile.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetStorageProfile
+ :param network_profile: The virtual machine scale set network profile.
+ :type network_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetNetworkProfile
+ :param extension_profile: The virtual machine scale set extension profile.
+ :type extension_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetExtensionProfile
+ """
+
+ _attribute_map = {
+ 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'},
+ 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'},
+ 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'},
+ 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
+ }
+
+ def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = os_profile
+ self.storage_profile = storage_profile
+ self.network_profile = network_profile
+ self.extension_profile = extension_profile
diff --git a/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
new file mode 100644
index 000000000000..b5d22478c827
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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 import Resource
+
+
+class VirtualMachineScaleSetVM(Resource):
+ """Describes a virtual machine scale set virtual machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar instance_id: The virtual machine instance ID.
+ :vartype instance_id: str
+ :ivar sku: The virtual machine SKU.
+ :vartype sku: ~azure.mgmt.compute.v2016_03_30.models.Sku
+ :ivar latest_model_applied: Specifies whether the latest model has been
+ applied to the virtual machine.
+ :vartype latest_model_applied: bool
+ :ivar vm_id: Azure VM unique ID.
+ :vartype vm_id: str
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineInstanceView
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2016_03_30.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2016_03_30.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2016_03_30.models.SubResource
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2016_03_30.models.Plan
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'instance_id': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'latest_model_applied': {'readonly': True},
+ 'vm_id': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'instance_id': {'key': 'instanceId', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'},
+ 'vm_id': {'key': 'properties.vmId', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': '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/v2016_03_30/models/virtual_machine_size.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size.py
index 3f4fa7f06b70..0fef3efd6c8e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size.py
@@ -43,11 +43,11 @@ class VirtualMachineSize(Model):
'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'},
}
- def __init__(self, name=None, number_of_cores=None, os_disk_size_in_mb=None, resource_disk_size_in_mb=None, memory_in_mb=None, max_data_disk_count=None):
- super(VirtualMachineSize, self).__init__()
- 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
+ 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/v2016_03_30/models/virtual_machine_size_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_size_py3.py
new file mode 100644
index 000000000000..9f99ba20ce42
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/virtual_machine_status_code_count.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count.py
index 177515706064..7df7b702acd7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count.py
@@ -35,7 +35,7 @@ class VirtualMachineStatusCodeCount(Model):
'count': {'key': 'count', 'type': 'int'},
}
- def __init__(self):
- super(VirtualMachineStatusCodeCount, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineStatusCodeCount, self).__init__(**kwargs)
self.code = None
self.count = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_status_code_count_py3.py
new file mode 100644
index 000000000000..c38800073a95
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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/v2016_03_30/models/win_rm_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration.py
index d96a229fe5fd..f781fc02fafc 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration.py
@@ -24,6 +24,6 @@ class WinRMConfiguration(Model):
'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
}
- def __init__(self, listeners=None):
- super(WinRMConfiguration, self).__init__()
- self.listeners = listeners
+ def __init__(self, **kwargs):
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = kwargs.get('listeners', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_configuration_py3.py
new file mode 100644
index 000000000000..e49e4abff89a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.WinRMListener]
+ """
+
+ _attribute_map = {
+ 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
+ }
+
+ def __init__(self, *, listeners=None, **kwargs) -> None:
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = listeners
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener.py
index 7a8e9b72fe02..3d984a9f0677 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener.py
@@ -36,7 +36,7 @@ class WinRMListener(Model):
'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
}
- def __init__(self, protocol=None, certificate_url=None):
- super(WinRMListener, self).__init__()
- self.protocol = protocol
- self.certificate_url = certificate_url
+ 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/v2016_03_30/models/win_rm_listener_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/win_rm_listener_py3.py
new file mode 100644
index 000000000000..01fde18332b1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.ProtocolTypes
+ :param certificate_url: This is the URL of a certificate that has been
+ uploaded to Key Vault as a secret. For adding a secret to the Key Vault,
+ see [Add a key or secret to the key
+ vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).
+ In this case, your certificate needs to be It is the Base64 encoding of
+ the following JSON Object which is encoded in UTF-8:
{
+ "data":"",
"dataType":"pfx",
+ "password":""
}
+ :type certificate_url: str
+ """
+
+ _attribute_map = {
+ 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'},
+ 'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None:
+ super(WinRMListener, self).__init__(**kwargs)
+ self.protocol = protocol
+ self.certificate_url = certificate_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration.py
index c3c6657075ba..c703e1650ee1 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration.py
@@ -45,10 +45,10 @@ class WindowsConfiguration(Model):
'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
}
- def __init__(self, provision_vm_agent=None, enable_automatic_updates=None, time_zone=None, additional_unattend_content=None, win_rm=None):
- super(WindowsConfiguration, self).__init__()
- 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
+ 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/v2016_03_30/models/windows_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/windows_configuration_py3.py
new file mode 100644
index 000000000000..045a6b233099
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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.v2016_03_30.models.AdditionalUnattendContent]
+ :param win_rm: Specifies the Windows Remote Management listeners. This
+ enables remote Windows PowerShell.
+ :type win_rm: ~azure.mgmt.compute.v2016_03_30.models.WinRMConfiguration
+ """
+
+ _attribute_map = {
+ 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'},
+ 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'},
+ 'time_zone': {'key': 'timeZone', 'type': 'str'},
+ 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'},
+ 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
+ }
+
+ def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None:
+ super(WindowsConfiguration, self).__init__(**kwargs)
+ self.provision_vm_agent = provision_vm_agent
+ self.enable_automatic_updates = enable_automatic_updates
+ self.time_zone = time_zone
+ self.additional_unattend_content = additional_unattend_content
+ self.win_rm = win_rm
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extensions_operations.py
index 67d5e5d035af..85496d3604f2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extensions_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_extensions_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -93,7 +93,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -108,13 +108,16 @@ def create_or_update(
:type extension_parameters:
~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineExtension or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachineExtension
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -126,30 +129,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineExtension', response)
if raw:
@@ -158,12 +139,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -214,7 +196,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +207,16 @@ def delete(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -242,30 +227,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -274,12 +237,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_set_vms_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_set_vms_operations.py
index e5baaedf8b34..8891c9a33a47 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_set_vms_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_set_vms_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -87,7 +87,7 @@ def _reimage_initial(
return deserialized
def reimage(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -98,13 +98,16 @@ def reimage(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_initial(
@@ -115,30 +118,8 @@ def reimage(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -147,12 +128,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -203,7 +185,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -216,13 +198,16 @@ def deallocate(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -233,30 +218,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -265,12 +228,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -321,7 +285,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -331,13 +295,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -348,30 +315,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -380,12 +325,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -652,7 +598,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -665,13 +611,16 @@ def power_off(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -682,30 +631,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -714,12 +641,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -770,7 +698,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -780,13 +708,16 @@ def restart(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -797,30 +728,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -829,12 +738,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -885,7 +795,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -895,13 +805,16 @@ def start(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -912,30 +825,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -944,10 +835,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_sets_operations.py
index aae80402d797..664138f0dde0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_sets_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machine_scale_sets_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Create or update a VM scale set.
:param resource_group_name: The name of the resource group.
@@ -103,13 +103,16 @@ def create_or_update(
:type parameters:
~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineScaleSet or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachineScaleSet
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -120,30 +123,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineScaleSet', response)
if raw:
@@ -152,12 +133,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -207,7 +189,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -215,13 +197,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -231,30 +216,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -263,12 +226,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -391,7 +355,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -407,13 +371,16 @@ def deallocate(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -424,30 +391,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -456,12 +401,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -517,7 +463,7 @@ def _delete_instances_initial(
return deserialized
def delete_instances(
- self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -527,13 +473,16 @@ def delete_instances(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_instances_initial(
@@ -544,30 +493,8 @@ def delete_instances(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -576,12 +503,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -914,7 +842,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -930,13 +858,16 @@ def power_off(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -947,30 +878,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -979,12 +888,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1045,7 +955,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1058,13 +968,16 @@ def restart(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -1075,30 +988,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1107,12 +998,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1173,7 +1065,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1186,13 +1078,16 @@ def start(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -1203,30 +1098,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1235,12 +1108,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1296,7 +1170,7 @@ def _update_instances_initial(
return deserialized
def update_instances(
- self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1307,13 +1181,16 @@ def update_instances(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._update_instances_initial(
@@ -1324,30 +1201,8 @@ def update_instances(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1356,12 +1211,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1411,7 +1267,7 @@ def _reimage_initial(
return deserialized
def reimage(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Reimages (upgrade the operating system) one or more virtual machines in
a VM scale set.
@@ -1420,13 +1276,16 @@ def reimage(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_initial(
@@ -1436,30 +1295,8 @@ def reimage(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1468,10 +1305,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machines_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machines_operations.py
index dfdd2abc26a7..25e5499522c4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machines_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/virtual_machines_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -90,7 +90,7 @@ def _capture_initial(
return deserialized
def capture(
- self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -103,13 +103,17 @@ def capture(
:type parameters:
~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureParameters
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineCaptureResult or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns
+ VirtualMachineCaptureResult or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureResult]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineCaptureResult]]
:raises: :class:`CloudError`
"""
raw_result = self._capture_initial(
@@ -120,30 +124,8 @@ def capture(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineCaptureResult', response)
if raw:
@@ -152,12 +134,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -213,7 +196,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +208,16 @@ def create_or_update(
:type parameters:
~azure.mgmt.compute.v2016_03_30.models.VirtualMachine
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachine or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachine or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.VirtualMachine]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -242,30 +228,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachine', response)
if raw:
@@ -274,12 +238,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -329,7 +294,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -337,13 +302,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -353,30 +321,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -385,12 +331,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -509,7 +456,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -519,13 +466,16 @@ def deallocate(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -535,30 +485,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -567,12 +495,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -893,7 +822,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -903,13 +832,16 @@ def power_off(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -919,30 +851,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -951,12 +861,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1006,7 +917,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1014,13 +925,16 @@ def restart(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -1030,30 +944,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1062,12 +954,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1117,7 +1010,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1125,13 +1018,16 @@ def start(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -1141,30 +1037,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1173,12 +1047,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1228,7 +1103,7 @@ def _redeploy_initial(
return deserialized
def redeploy(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1236,13 +1111,16 @@ def redeploy(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._redeploy_initial(
@@ -1252,30 +1130,8 @@ def redeploy(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1284,10 +1140,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py
index 3439fa2555b9..2cc876579a96 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py
@@ -9,104 +9,204 @@
# regenerated.
# --------------------------------------------------------------------------
-from .instance_view_status import InstanceViewStatus
-from .sub_resource import SubResource
-from .sku import Sku
-from .availability_set import AvailabilitySet
-from .virtual_machine_size import VirtualMachineSize
-from .virtual_machine_extension_image import VirtualMachineExtensionImage
-from .virtual_machine_image_resource import VirtualMachineImageResource
-from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
-from .virtual_machine_extension import VirtualMachineExtension
-from .purchase_plan import PurchasePlan
-from .os_disk_image import OSDiskImage
-from .data_disk_image import DataDiskImage
-from .virtual_machine_image import VirtualMachineImage
-from .usage_name import UsageName
-from .usage import Usage
-from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
-from .virtual_machine_capture_result import VirtualMachineCaptureResult
-from .plan import Plan
-from .hardware_profile import HardwareProfile
-from .image_reference import ImageReference
-from .key_vault_secret_reference import KeyVaultSecretReference
-from .key_vault_key_reference import KeyVaultKeyReference
-from .disk_encryption_settings import DiskEncryptionSettings
-from .virtual_hard_disk import VirtualHardDisk
-from .managed_disk_parameters import ManagedDiskParameters
-from .os_disk import OSDisk
-from .data_disk import DataDisk
-from .storage_profile import StorageProfile
-from .additional_unattend_content import AdditionalUnattendContent
-from .win_rm_listener import WinRMListener
-from .win_rm_configuration import WinRMConfiguration
-from .windows_configuration import WindowsConfiguration
-from .ssh_public_key import SshPublicKey
-from .ssh_configuration import SshConfiguration
-from .linux_configuration import LinuxConfiguration
-from .vault_certificate import VaultCertificate
-from .vault_secret_group import VaultSecretGroup
-from .os_profile import OSProfile
-from .network_interface_reference import NetworkInterfaceReference
-from .network_profile import NetworkProfile
-from .boot_diagnostics import BootDiagnostics
-from .diagnostics_profile import DiagnosticsProfile
-from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
-from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
-from .disk_instance_view import DiskInstanceView
-from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
-from .virtual_machine_identity import VirtualMachineIdentity
-from .virtual_machine_instance_view import VirtualMachineInstanceView
-from .virtual_machine import VirtualMachine
-from .upgrade_policy import UpgradePolicy
-from .image_os_disk import ImageOSDisk
-from .image_data_disk import ImageDataDisk
-from .image_storage_profile import ImageStorageProfile
-from .image import Image
-from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity
-from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
-from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters
-from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
-from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk
-from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
-from .api_entity_reference import ApiEntityReference
-from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
-from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
-from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
-from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
-from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
-from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
-from .virtual_machine_scale_set import VirtualMachineScaleSet
-from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
-from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
-from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
-from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
-from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
-from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
-from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
-from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
-from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM
-from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView
-from .api_error_base import ApiErrorBase
-from .inner_error import InnerError
-from .api_error import ApiError
-from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
-from .resource import Resource
-from .sub_resource_read_only import SubResourceReadOnly
-from .operation_status_response import OperationStatusResponse
-from .resource_update import ResourceUpdate
-from .image_disk_reference import ImageDiskReference
-from .creation_data import CreationData
-from .source_vault import SourceVault
-from .key_vault_and_secret_reference import KeyVaultAndSecretReference
-from .key_vault_and_key_reference import KeyVaultAndKeyReference
-from .encryption_settings import EncryptionSettings
-from .disk import Disk
-from .disk_update import DiskUpdate
-from .grant_access_data import GrantAccessData
-from .access_uri import AccessUri
-from .snapshot import Snapshot
-from .snapshot_update import SnapshotUpdate
+try:
+ from .instance_view_status_py3 import InstanceViewStatus
+ from .sub_resource_py3 import SubResource
+ from .sku_py3 import Sku
+ from .availability_set_py3 import AvailabilitySet
+ from .virtual_machine_size_py3 import VirtualMachineSize
+ from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource_py3 import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension_py3 import VirtualMachineExtension
+ from .purchase_plan_py3 import PurchasePlan
+ from .os_disk_image_py3 import OSDiskImage
+ from .data_disk_image_py3 import DataDiskImage
+ from .virtual_machine_image_py3 import VirtualMachineImage
+ from .usage_name_py3 import UsageName
+ from .usage_py3 import Usage
+ from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult
+ from .plan_py3 import Plan
+ from .hardware_profile_py3 import HardwareProfile
+ from .image_reference_py3 import ImageReference
+ from .key_vault_secret_reference_py3 import KeyVaultSecretReference
+ from .key_vault_key_reference_py3 import KeyVaultKeyReference
+ from .disk_encryption_settings_py3 import DiskEncryptionSettings
+ from .virtual_hard_disk_py3 import VirtualHardDisk
+ from .managed_disk_parameters_py3 import ManagedDiskParameters
+ from .os_disk_py3 import OSDisk
+ from .data_disk_py3 import DataDisk
+ from .storage_profile_py3 import StorageProfile
+ from .additional_unattend_content_py3 import AdditionalUnattendContent
+ from .win_rm_listener_py3 import WinRMListener
+ from .win_rm_configuration_py3 import WinRMConfiguration
+ from .windows_configuration_py3 import WindowsConfiguration
+ from .ssh_public_key_py3 import SshPublicKey
+ from .ssh_configuration_py3 import SshConfiguration
+ from .linux_configuration_py3 import LinuxConfiguration
+ from .vault_certificate_py3 import VaultCertificate
+ from .vault_secret_group_py3 import VaultSecretGroup
+ from .os_profile_py3 import OSProfile
+ from .network_interface_reference_py3 import NetworkInterfaceReference
+ from .network_profile_py3 import NetworkProfile
+ from .boot_diagnostics_py3 import BootDiagnostics
+ from .diagnostics_profile_py3 import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView
+ from .disk_instance_view_py3 import DiskInstanceView
+ from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView
+ from .virtual_machine_identity_py3 import VirtualMachineIdentity
+ from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView
+ from .virtual_machine_py3 import VirtualMachine
+ from .upgrade_policy_py3 import UpgradePolicy
+ from .image_os_disk_py3 import ImageOSDisk
+ from .image_data_disk_py3 import ImageDataDisk
+ from .image_storage_profile_py3 import ImageStorageProfile
+ from .image_py3 import Image
+ from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity
+ from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters
+ from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk
+ from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile
+ from .api_entity_reference_py3 import ApiEntityReference
+ from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku
+ from .virtual_machine_scale_set_vm_py3 import VirtualMachineScaleSetVM
+ from .virtual_machine_scale_set_vm_instance_view_py3 import VirtualMachineScaleSetVMInstanceView
+ from .api_error_base_py3 import ApiErrorBase
+ from .inner_error_py3 import InnerError
+ from .api_error_py3 import ApiError
+ from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties
+ from .resource_py3 import Resource
+ from .sub_resource_read_only_py3 import SubResourceReadOnly
+ from .operation_status_response_py3 import OperationStatusResponse
+ from .resource_update_py3 import ResourceUpdate
+ from .image_disk_reference_py3 import ImageDiskReference
+ from .creation_data_py3 import CreationData
+ from .source_vault_py3 import SourceVault
+ from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference
+ from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference
+ from .encryption_settings_py3 import EncryptionSettings
+ from .disk_py3 import Disk
+ from .disk_update_py3 import DiskUpdate
+ from .grant_access_data_py3 import GrantAccessData
+ from .access_uri_py3 import AccessUri
+ from .snapshot_py3 import Snapshot
+ from .snapshot_update_py3 import SnapshotUpdate
+except (SyntaxError, ImportError):
+ from .instance_view_status import InstanceViewStatus
+ from .sub_resource import SubResource
+ from .sku import Sku
+ from .availability_set import AvailabilitySet
+ from .virtual_machine_size import VirtualMachineSize
+ from .virtual_machine_extension_image import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension import VirtualMachineExtension
+ from .purchase_plan import PurchasePlan
+ from .os_disk_image import OSDiskImage
+ from .data_disk_image import DataDiskImage
+ from .virtual_machine_image import VirtualMachineImage
+ from .usage_name import UsageName
+ from .usage import Usage
+ from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result import VirtualMachineCaptureResult
+ from .plan import Plan
+ from .hardware_profile import HardwareProfile
+ from .image_reference import ImageReference
+ from .key_vault_secret_reference import KeyVaultSecretReference
+ from .key_vault_key_reference import KeyVaultKeyReference
+ from .disk_encryption_settings import DiskEncryptionSettings
+ from .virtual_hard_disk import VirtualHardDisk
+ from .managed_disk_parameters import ManagedDiskParameters
+ from .os_disk import OSDisk
+ from .data_disk import DataDisk
+ from .storage_profile import StorageProfile
+ from .additional_unattend_content import AdditionalUnattendContent
+ from .win_rm_listener import WinRMListener
+ from .win_rm_configuration import WinRMConfiguration
+ from .windows_configuration import WindowsConfiguration
+ from .ssh_public_key import SshPublicKey
+ from .ssh_configuration import SshConfiguration
+ from .linux_configuration import LinuxConfiguration
+ from .vault_certificate import VaultCertificate
+ from .vault_secret_group import VaultSecretGroup
+ from .os_profile import OSProfile
+ from .network_interface_reference import NetworkInterfaceReference
+ from .network_profile import NetworkProfile
+ from .boot_diagnostics import BootDiagnostics
+ from .diagnostics_profile import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
+ from .disk_instance_view import DiskInstanceView
+ from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
+ from .virtual_machine_identity import VirtualMachineIdentity
+ from .virtual_machine_instance_view import VirtualMachineInstanceView
+ from .virtual_machine import VirtualMachine
+ from .upgrade_policy import UpgradePolicy
+ from .image_os_disk import ImageOSDisk
+ from .image_data_disk import ImageDataDisk
+ from .image_storage_profile import ImageStorageProfile
+ from .image import Image
+ from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity
+ from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters
+ from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk
+ from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
+ from .api_entity_reference import ApiEntityReference
+ from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
+ from .virtual_machine_scale_set_vm import VirtualMachineScaleSetVM
+ from .virtual_machine_scale_set_vm_instance_view import VirtualMachineScaleSetVMInstanceView
+ from .api_error_base import ApiErrorBase
+ from .inner_error import InnerError
+ from .api_error import ApiError
+ from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
+ from .resource import Resource
+ from .sub_resource_read_only import SubResourceReadOnly
+ from .operation_status_response import OperationStatusResponse
+ from .resource_update import ResourceUpdate
+ from .image_disk_reference import ImageDiskReference
+ from .creation_data import CreationData
+ from .source_vault import SourceVault
+ from .key_vault_and_secret_reference import KeyVaultAndSecretReference
+ from .key_vault_and_key_reference import KeyVaultAndKeyReference
+ from .encryption_settings import EncryptionSettings
+ from .disk import Disk
+ from .disk_update import DiskUpdate
+ from .grant_access_data import GrantAccessData
+ from .access_uri import AccessUri
+ from .snapshot import Snapshot
+ from .snapshot_update import SnapshotUpdate
from .availability_set_paged import AvailabilitySetPaged
from .virtual_machine_size_paged import VirtualMachineSizePaged
from .usage_paged import UsagePaged
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri.py
index 09f8982bc3a7..9ee6b01de1e1 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri.py
@@ -30,6 +30,6 @@ class AccessUri(Model):
'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'},
}
- def __init__(self):
- super(AccessUri, self).__init__()
+ def __init__(self, **kwargs):
+ super(AccessUri, self).__init__(**kwargs)
self.access_sas = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri_py3.py
new file mode 100644
index 000000000000..bb9e56aa4221
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/access_uri_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 AccessUri(Model):
+ """A disk access SAS uri.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar access_sas: A SAS uri for accessing a disk.
+ :vartype access_sas: str
+ """
+
+ _validation = {
+ 'access_sas': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(AccessUri, self).__init__(**kwargs)
+ self.access_sas = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content.py
index 6ef9838f40a9..01ffa6dc685d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content.py
@@ -45,9 +45,9 @@ class AdditionalUnattendContent(Model):
'content': {'key': 'content', 'type': 'str'},
}
- def __init__(self, pass_name=None, component_name=None, setting_name=None, content=None):
- super(AdditionalUnattendContent, self).__init__()
- self.pass_name = pass_name
- self.component_name = component_name
- self.setting_name = setting_name
- self.content = content
+ 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/v2016_04_30_preview/models/additional_unattend_content_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content_py3.py
new file mode 100644
index 000000000000..8928cbeba053
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/additional_unattend_content_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 AdditionalUnattendContent(Model):
+ """Specifies additional XML formatted information that can be included in the
+ Unattend.xml file, which is used by Windows Setup. Contents are defined by
+ setting name, component name, and the pass in which the content is applied.
+
+ :param pass_name: The pass name. Currently, the only allowable value is
+ OobeSystem. Possible values include: 'OobeSystem'
+ :type pass_name: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.PassNames
+ :param component_name: The component name. Currently, the only allowable
+ value is Microsoft-Windows-Shell-Setup. Possible values include:
+ 'Microsoft-Windows-Shell-Setup'
+ :type component_name: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ComponentNames
+ :param setting_name: Specifies the name of the setting to which the
+ content applies. Possible values are: FirstLogonCommands and AutoLogon.
+ Possible values include: 'AutoLogon', 'FirstLogonCommands'
+ :type setting_name: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SettingNames
+ :param content: Specifies the XML formatted content that is added to the
+ unattend.xml file for the specified path and component. The XML must be
+ less than 4KB and must include the root element for the setting or feature
+ that is being inserted.
+ :type content: str
+ """
+
+ _attribute_map = {
+ 'pass_name': {'key': 'passName', 'type': 'PassNames'},
+ 'component_name': {'key': 'componentName', 'type': 'ComponentNames'},
+ 'setting_name': {'key': 'settingName', 'type': 'SettingNames'},
+ 'content': {'key': 'content', 'type': 'str'},
+ }
+
+ def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None:
+ super(AdditionalUnattendContent, self).__init__(**kwargs)
+ self.pass_name = pass_name
+ self.component_name = component_name
+ self.setting_name = setting_name
+ self.content = content
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference.py
index 27696aacc3dc..d1bf572e916d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference.py
@@ -24,6 +24,6 @@ class ApiEntityReference(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(ApiEntityReference, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(ApiEntityReference, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_entity_reference_py3.py
new file mode 100644
index 000000000000..da3e07082381
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/api_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error.py
index 5bd7f3284ce2..8af390cf58fe 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error.py
@@ -37,10 +37,10 @@ class ApiError(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, details=None, innererror=None, code=None, target=None, message=None):
- super(ApiError, self).__init__()
- self.details = details
- self.innererror = innererror
- self.code = code
- self.target = target
- self.message = message
+ 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/v2016_04_30_preview/models/api_error_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base.py
index 2fb33a0ff411..655c08638905 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base.py
@@ -29,8 +29,8 @@ class ApiErrorBase(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, code=None, target=None, message=None):
- super(ApiErrorBase, self).__init__()
- self.code = code
- self.target = target
- self.message = message
+ 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/v2016_04_30_preview/models/api_error_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_base_py3.py
new file mode 100644
index 000000000000..5ba95aa0283e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/api_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_py3.py
new file mode 100644
index 000000000000..2397cacf656a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/api_error_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 ApiError(Model):
+ """Api error.
+
+ :param details: The Api error details
+ :type details:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.ApiErrorBase]
+ :param innererror: The Api inner error
+ :type innererror:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.InnerError
+ :param code: The error code.
+ :type code: str
+ :param target: The target of the particular error.
+ :type target: str
+ :param message: The error message.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'details': {'key': 'details', 'type': '[ApiErrorBase]'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ 'code': {'key': 'code', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None:
+ super(ApiError, self).__init__(**kwargs)
+ self.details = details
+ self.innererror = innererror
+ self.code = code
+ self.target = target
+ self.message = message
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set.py
index aa7a95dbb340..1793a6943267 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set.py
@@ -28,13 +28,15 @@ class AvailabilitySet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -77,11 +79,11 @@ class AvailabilitySet(Resource):
'sku': {'key': 'sku', 'type': 'Sku'},
}
- def __init__(self, location, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None, managed=None, sku=None):
- super(AvailabilitySet, self).__init__(location=location, tags=tags)
- self.platform_update_domain_count = platform_update_domain_count
- self.platform_fault_domain_count = platform_fault_domain_count
- self.virtual_machines = virtual_machines
+ def __init__(self, **kwargs):
+ super(AvailabilitySet, self).__init__(**kwargs)
+ self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None)
+ self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None)
+ self.virtual_machines = kwargs.get('virtual_machines', None)
self.statuses = None
- self.managed = managed
- self.sku = sku
+ self.managed = kwargs.get('managed', None)
+ self.sku = kwargs.get('sku', None)
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
new file mode 100644
index 000000000000..f9e977dbe70c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/availability_set_py3.py
@@ -0,0 +1,89 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license 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.v2016_04_30_preview.models.SubResource]
+ :ivar statuses: The resource status information.
+ :vartype statuses:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus]
+ :param managed: If the availability set supports managed disks.
+ :type managed: bool
+ :param sku: Sku of the availability set
+ :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'statuses': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
+ 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
+ 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
+ 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
+ 'managed': {'key': 'properties.managed', 'type': 'bool'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ }
+
+ def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, managed: bool=None, sku=None, **kwargs) -> None:
+ super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs)
+ self.platform_update_domain_count = platform_update_domain_count
+ self.platform_fault_domain_count = platform_fault_domain_count
+ self.virtual_machines = virtual_machines
+ self.statuses = None
+ self.managed = managed
+ self.sku = sku
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics.py
index c94d188e3fba..ca3dbdd4f23c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics.py
@@ -32,7 +32,7 @@ class BootDiagnostics(Model):
'storage_uri': {'key': 'storageUri', 'type': 'str'},
}
- def __init__(self, enabled=None, storage_uri=None):
- super(BootDiagnostics, self).__init__()
- self.enabled = enabled
- self.storage_uri = storage_uri
+ 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/v2016_04_30_preview/models/boot_diagnostics_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view.py
index 4ec7b385558d..6fe1f84a3910 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view.py
@@ -26,7 +26,7 @@ class BootDiagnosticsInstanceView(Model):
'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'},
}
- def __init__(self, console_screenshot_blob_uri=None, serial_console_log_blob_uri=None):
- super(BootDiagnosticsInstanceView, self).__init__()
- self.console_screenshot_blob_uri = console_screenshot_blob_uri
- self.serial_console_log_blob_uri = serial_console_log_blob_uri
+ 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/v2016_04_30_preview/models/boot_diagnostics_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_instance_view_py3.py
new file mode 100644
index 000000000000..d85b51981ab9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/boot_diagnostics_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/boot_diagnostics_py3.py
new file mode 100644
index 000000000000..b0a756ea4fa0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/compute_long_running_operation_properties.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties.py
index f8ca23e0ccdf..66ff353eb206 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties.py
@@ -23,6 +23,6 @@ class ComputeLongRunningOperationProperties(Model):
'output': {'key': 'output', 'type': 'object'},
}
- def __init__(self, output=None):
- super(ComputeLongRunningOperationProperties, self).__init__()
- self.output = output
+ def __init__(self, **kwargs):
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties_py3.py
new file mode 100644
index 000000000000..a4ffd6c8c32f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_long_running_operation_properties_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 ComputeLongRunningOperationProperties(Model):
+ """Compute-specific operation properties, including output.
+
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'output': {'key': 'output', 'type': 'object'},
+ }
+
+ def __init__(self, *, output=None, **kwargs) -> None:
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_management_client_enums.py
index c488a02cc4e6..af9eb5a77018 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_management_client_enums.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/compute_management_client_enums.py
@@ -12,20 +12,20 @@
from enum import Enum
-class StatusLevelTypes(Enum):
+class StatusLevelTypes(str, Enum):
info = "Info"
warning = "Warning"
error = "Error"
-class OperatingSystemTypes(Enum):
+class OperatingSystemTypes(str, Enum):
windows = "Windows"
linux = "Linux"
-class VirtualMachineSizeTypes(Enum):
+class VirtualMachineSizeTypes(str, Enum):
basic_a0 = "Basic_A0"
basic_a1 = "Basic_A1"
@@ -92,72 +92,72 @@ class VirtualMachineSizeTypes(Enum):
standard_gs5 = "Standard_GS5"
-class CachingTypes(Enum):
+class CachingTypes(str, Enum):
none = "None"
read_only = "ReadOnly"
read_write = "ReadWrite"
-class DiskCreateOptionTypes(Enum):
+class DiskCreateOptionTypes(str, Enum):
from_image = "FromImage"
empty = "Empty"
attach = "Attach"
-class StorageAccountTypes(Enum):
+class StorageAccountTypes(str, Enum):
standard_lrs = "Standard_LRS"
premium_lrs = "Premium_LRS"
-class PassNames(Enum):
+class PassNames(str, Enum):
oobe_system = "OobeSystem"
-class ComponentNames(Enum):
+class ComponentNames(str, Enum):
microsoft_windows_shell_setup = "Microsoft-Windows-Shell-Setup"
-class SettingNames(Enum):
+class SettingNames(str, Enum):
auto_logon = "AutoLogon"
first_logon_commands = "FirstLogonCommands"
-class ProtocolTypes(Enum):
+class ProtocolTypes(str, Enum):
http = "Http"
https = "Https"
-class ResourceIdentityType(Enum):
+class ResourceIdentityType(str, Enum):
system_assigned = "SystemAssigned"
-class UpgradeMode(Enum):
+class UpgradeMode(str, Enum):
automatic = "Automatic"
manual = "Manual"
-class OperatingSystemStateTypes(Enum):
+class OperatingSystemStateTypes(str, Enum):
generalized = "Generalized"
specialized = "Specialized"
-class VirtualMachineScaleSetSkuScaleType(Enum):
+class VirtualMachineScaleSetSkuScaleType(str, Enum):
automatic = "Automatic"
none = "None"
-class DiskCreateOption(Enum):
+class DiskCreateOption(str, Enum):
empty = "Empty"
attach = "Attach"
@@ -167,12 +167,12 @@ class DiskCreateOption(Enum):
restore = "Restore"
-class AccessLevel(Enum):
+class AccessLevel(str, Enum):
none = "None"
read = "Read"
-class InstanceViewTypes(Enum):
+class InstanceViewTypes(str, Enum):
instance_view = "instanceView"
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data.py
index 3ee2d7cc0d8a..1cd8716a89d5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data.py
@@ -15,8 +15,10 @@
class CreationData(Model):
"""Data used when creating a disk.
- :param create_option: This enumerates the possible sources of a disk's
- creation. Possible values include: 'Empty', 'Attach', 'FromImage',
+ All required parameters must be populated in order to send to Azure.
+
+ :param create_option: Required. This enumerates the possible sources of a
+ disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage',
'Import', 'Copy', 'Restore'
:type create_option: str or
~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOption
@@ -50,10 +52,10 @@ class CreationData(Model):
'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'},
}
- def __init__(self, create_option, storage_account_id=None, image_reference=None, source_uri=None, source_resource_id=None):
- super(CreationData, self).__init__()
- self.create_option = create_option
- self.storage_account_id = storage_account_id
- self.image_reference = image_reference
- self.source_uri = source_uri
- self.source_resource_id = source_resource_id
+ def __init__(self, **kwargs):
+ super(CreationData, self).__init__(**kwargs)
+ self.create_option = kwargs.get('create_option', None)
+ self.storage_account_id = kwargs.get('storage_account_id', None)
+ self.image_reference = kwargs.get('image_reference', None)
+ self.source_uri = kwargs.get('source_uri', None)
+ self.source_resource_id = kwargs.get('source_resource_id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data_py3.py
new file mode 100644
index 000000000000..f0206b35dc92
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/creation_data_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 msrest.serialization import Model
+
+
+class CreationData(Model):
+ """Data used when creating a disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param create_option: Required. This enumerates the possible sources of a
+ disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage',
+ 'Import', 'Copy', 'Restore'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOption
+ :param storage_account_id: If createOption is Import, the Azure Resource
+ Manager identifier of the storage account containing the blob to import as
+ a disk. Required only if the blob is in a different subscription
+ :type storage_account_id: str
+ :param image_reference: Disk source information.
+ :type image_reference:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ImageDiskReference
+ :param source_uri: If createOption is Import, this is a SAS URI to a blob
+ to be imported into a managed disk. If createOption is Copy, this is a
+ relative Uri containing the id of the source snapshot to be copied into a
+ managed disk.
+ :type source_uri: str
+ :param source_resource_id: If createOption is Copy, this is the ARM id of
+ the source snapshot or disk. If createOption is Restore, this is the
+ ARM-like id of the source disk restore point.
+ :type source_resource_id: str
+ """
+
+ _validation = {
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'},
+ 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'},
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'},
+ 'source_uri': {'key': 'sourceUri', 'type': 'str'},
+ 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'},
+ }
+
+ def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None:
+ super(CreationData, self).__init__(**kwargs)
+ self.create_option = create_option
+ self.storage_account_id = storage_account_id
+ self.image_reference = image_reference
+ self.source_uri = source_uri
+ self.source_resource_id = source_resource_id
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk.py
index 0cc1b1dd92b0..1db128727007 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk.py
@@ -15,9 +15,11 @@
class DataDisk(Model):
"""Describes a data disk.
- :param 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.
+ 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
@@ -35,8 +37,8 @@ class DataDisk(Model):
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or
~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -70,13 +72,13 @@ class DataDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
}
- def __init__(self, lun, create_option, name=None, vhd=None, image=None, caching=None, disk_size_gb=None, managed_disk=None):
- super(DataDisk, self).__init__()
- self.lun = lun
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = kwargs.get('lun', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image.py
index 60a4befc525f..b5dbfcefb472 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image.py
@@ -32,6 +32,6 @@ class DataDiskImage(Model):
'lun': {'key': 'lun', 'type': 'int'},
}
- def __init__(self):
- super(DataDiskImage, self).__init__()
+ def __init__(self, **kwargs):
+ super(DataDiskImage, self).__init__(**kwargs)
self.lun = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_image_py3.py
new file mode 100644
index 000000000000..8431a3988502
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_py3.py
new file mode 100644
index 000000000000..adcc250ba2e2
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/data_disk_py3.py
@@ -0,0 +1,84 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DataDisk(Model):
+ """Describes a data disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
+ :type lun: int
+ :param name: The disk name.
+ :type name: str
+ :param vhd: The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the 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.v2016_04_30_preview.models.ManagedDiskParameters
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
+ }
+
+ def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = lun
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile.py
index f25430c35478..7e52b45ee5c8 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile.py
@@ -29,6 +29,6 @@ class DiagnosticsProfile(Model):
'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
}
- def __init__(self, boot_diagnostics=None):
- super(DiagnosticsProfile, self).__init__()
- self.boot_diagnostics = boot_diagnostics
+ 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/v2016_04_30_preview/models/diagnostics_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/diagnostics_profile_py3.py
new file mode 100644
index 000000000000..f30752cea400
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.BootDiagnostics
+ """
+
+ _attribute_map = {
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
+ }
+
+ def __init__(self, *, boot_diagnostics=None, **kwargs) -> None:
+ super(DiagnosticsProfile, self).__init__(**kwargs)
+ self.boot_diagnostics = boot_diagnostics
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk.py
index 00f0a664e465..03748ff9aef8 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk.py
@@ -18,13 +18,15 @@ class Disk(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -38,8 +40,8 @@ class Disk(Resource):
'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
- :param creation_data: Disk source information. CreationData information
- cannot be changed after the disk has been created.
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
:type creation_data:
~azure.mgmt.compute.v2016_04_30_preview.models.CreationData
:param disk_size_gb: If creationData.createOption is Empty, this field is
@@ -85,13 +87,13 @@ class Disk(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, location, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb=None, encryption_settings=None):
- super(Disk, self).__init__(location=location, tags=tags)
- self.account_type = account_type
+ def __init__(self, **kwargs):
+ super(Disk, self).__init__(**kwargs)
+ self.account_type = kwargs.get('account_type', None)
self.time_created = None
- self.os_type = os_type
- self.creation_data = creation_data
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ self.os_type = kwargs.get('os_type', None)
+ self.creation_data = kwargs.get('creation_data', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
self.owner_id = None
self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings.py
index a7b3e3f238a3..65fd8f27b79d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings.py
@@ -34,8 +34,8 @@ class DiskEncryptionSettings(Model):
'enabled': {'key': 'enabled', 'type': 'bool'},
}
- def __init__(self, disk_encryption_key=None, key_encryption_key=None, enabled=None):
- super(DiskEncryptionSettings, self).__init__()
- self.disk_encryption_key = disk_encryption_key
- self.key_encryption_key = key_encryption_key
- self.enabled = enabled
+ 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/v2016_04_30_preview/models/disk_encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_encryption_settings_py3.py
new file mode 100644
index 000000000000..5660286740dc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.KeyVaultSecretReference
+ :param key_encryption_key: Specifies the location of the key encryption
+ key in Key Vault.
+ :type key_encryption_key:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultKeyReference
+ :param enabled: Specifies whether disk encryption should be enabled on the
+ virtual machine.
+ :type enabled: bool
+ """
+
+ _attribute_map = {
+ 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'},
+ 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'},
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ }
+
+ def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None:
+ super(DiskEncryptionSettings, self).__init__(**kwargs)
+ self.disk_encryption_key = disk_encryption_key
+ self.key_encryption_key = key_encryption_key
+ self.enabled = enabled
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view.py
index 9ac7cab9e323..d74755f0ec76 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view.py
@@ -27,7 +27,7 @@ class DiskInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, statuses=None):
- super(DiskInstanceView, self).__init__()
- self.name = name
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(DiskInstanceView, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view_py3.py
new file mode 100644
index 000000000000..1ce314459fad
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_instance_view_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 DiskInstanceView(Model):
+ """The instance view of the disk.
+
+ :param name: The disk name.
+ :type name: str
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, statuses=None, **kwargs) -> None:
+ super(DiskInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..cf3b3dab5351
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_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 .resource import Resource
+
+
+class Disk(Resource):
+ """Disk resource.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param account_type: the storage account type of the disk. Possible values
+ include: 'Standard_LRS', 'Premium_LRS'
+ :type account_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes
+ :ivar time_created: The time when the disk was created.
+ :vartype time_created: datetime
+ :param os_type: The Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
+ :type creation_data:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings
+ :ivar owner_id: A relative URI containing the VM id that has the disk
+ attached.
+ :vartype owner_id: str
+ :ivar provisioning_state: The disk provisioning state.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'time_created': {'readonly': True},
+ 'creation_data': {'required': True},
+ 'owner_id': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ 'owner_id': {'key': 'properties.ownerId', 'type': 'str'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(Disk, self).__init__(location=location, tags=tags, **kwargs)
+ self.account_type = account_type
+ self.time_created = None
+ self.os_type = os_type
+ self.creation_data = creation_data
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
+ self.owner_id = None
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update.py
index e770e8e622a6..412257542cfc 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_update.py
@@ -49,10 +49,10 @@ class DiskUpdate(ResourceUpdate):
'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
}
- def __init__(self, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb=None, encryption_settings=None):
- super(DiskUpdate, self).__init__(tags=tags)
- self.account_type = account_type
- self.os_type = os_type
- self.creation_data = creation_data
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ def __init__(self, **kwargs):
+ super(DiskUpdate, self).__init__(**kwargs)
+ self.account_type = kwargs.get('account_type', None)
+ self.os_type = kwargs.get('os_type', None)
+ self.creation_data = kwargs.get('creation_data', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
diff --git a/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
new file mode 100644
index 000000000000..545c2a218368
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/disk_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 .resource_update import ResourceUpdate
+
+
+class DiskUpdate(ResourceUpdate):
+ """Disk update resource.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param account_type: the storage account type of the disk. Possible values
+ include: 'Standard_LRS', 'Premium_LRS'
+ :type account_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes
+ :param os_type: the Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
+ :param creation_data: disk source information. CreationData information
+ cannot be changed after the disk has been created.
+ :type creation_data:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ }
+
+ def __init__(self, *, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(DiskUpdate, self).__init__(tags=tags, **kwargs)
+ self.account_type = account_type
+ self.os_type = os_type
+ self.creation_data = creation_data
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py
index 1e479330b6ed..3d7c6049d35e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings.py
@@ -37,8 +37,8 @@ class EncryptionSettings(Model):
'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'},
}
- def __init__(self, enabled=None, disk_encryption_key=None, key_encryption_key=None):
- super(EncryptionSettings, self).__init__()
- self.enabled = enabled
- self.disk_encryption_key = disk_encryption_key
- self.key_encryption_key = key_encryption_key
+ def __init__(self, **kwargs):
+ super(EncryptionSettings, self).__init__(**kwargs)
+ self.enabled = kwargs.get('enabled', None)
+ self.disk_encryption_key = kwargs.get('disk_encryption_key', None)
+ self.key_encryption_key = kwargs.get('key_encryption_key', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings_py3.py
new file mode 100644
index 000000000000..2cd6b654abdb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/encryption_settings_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 EncryptionSettings(Model):
+ """Encryption settings for disk or snapshot.
+
+ :param enabled: Set this flag to true and provide DiskEncryptionKey and
+ optional KeyEncryptionKey to enable encryption. Set this flag to false and
+ remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If
+ EncryptionSettings is null in the request object, the existing settings
+ remain unchanged.
+ :type enabled: bool
+ :param disk_encryption_key: Key Vault Secret Url and vault id of the disk
+ encryption key
+ :type disk_encryption_key:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndSecretReference
+ :param key_encryption_key: Key Vault Key Url and vault id of the key
+ encryption key
+ :type key_encryption_key:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.KeyVaultAndKeyReference
+ """
+
+ _attribute_map = {
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'},
+ 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'},
+ }
+
+ def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None:
+ super(EncryptionSettings, self).__init__(**kwargs)
+ self.enabled = enabled
+ self.disk_encryption_key = disk_encryption_key
+ self.key_encryption_key = key_encryption_key
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data.py
index 23829c0a3342..a0de15034343 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data.py
@@ -15,11 +15,13 @@
class GrantAccessData(Model):
"""Data used for requesting a SAS.
- :param access: Possible values include: 'None', 'Read'
+ All required parameters must be populated in order to send to Azure.
+
+ :param access: Required. Possible values include: 'None', 'Read'
:type access: str or
~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel
- :param duration_in_seconds: Time duration in seconds until the SAS access
- expires.
+ :param duration_in_seconds: Required. Time duration in seconds until the
+ SAS access expires.
:type duration_in_seconds: int
"""
@@ -33,7 +35,7 @@ class GrantAccessData(Model):
'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'},
}
- def __init__(self, access, duration_in_seconds):
- super(GrantAccessData, self).__init__()
- self.access = access
- self.duration_in_seconds = duration_in_seconds
+ def __init__(self, **kwargs):
+ super(GrantAccessData, self).__init__(**kwargs)
+ self.access = kwargs.get('access', None)
+ self.duration_in_seconds = kwargs.get('duration_in_seconds', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data_py3.py
new file mode 100644
index 000000000000..65416406cdcd
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/grant_access_data_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 GrantAccessData(Model):
+ """Data used for requesting a SAS.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param access: Required. Possible values include: 'None', 'Read'
+ :type access: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.AccessLevel
+ :param duration_in_seconds: Required. Time duration in seconds until the
+ SAS access expires.
+ :type duration_in_seconds: int
+ """
+
+ _validation = {
+ 'access': {'required': True},
+ 'duration_in_seconds': {'required': True},
+ }
+
+ _attribute_map = {
+ 'access': {'key': 'access', 'type': 'AccessLevel'},
+ 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'},
+ }
+
+ def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None:
+ super(GrantAccessData, self).__init__(**kwargs)
+ self.access = access
+ self.duration_in_seconds = duration_in_seconds
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile.py
index 5e69c7f08003..e9c70839ab5b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile.py
@@ -50,6 +50,6 @@ class HardwareProfile(Model):
'vm_size': {'key': 'vmSize', 'type': 'str'},
}
- def __init__(self, vm_size=None):
- super(HardwareProfile, self).__init__()
- self.vm_size = vm_size
+ 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/v2016_04_30_preview/models/hardware_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_profile_py3.py
new file mode 100644
index 000000000000..97df538e0894
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/hardware_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 HardwareProfile(Model):
+ """Specifies the hardware settings for the virtual machine.
+
+ :param vm_size: Specifies the size of the virtual machine. For more
+ information about virtual machine sizes, see [Sizes for virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
The available VM sizes depend on region and availability set. For
+ a list of available sizes use these APIs:
[List all available
+ virtual machine sizes in an availability
+ set](virtualmachines-list-sizes-availability-set.md)
[List all
+ available virtual machine sizes in a
+ region](virtualmachines-list-sizes-region.md)
[List all available
+ virtual machine sizes for
+ resizing](virtualmachines-list-sizes-for-resizing.md). Possible values
+ include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4',
+ 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4',
+ 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9',
+ 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2',
+ 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12',
+ 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2',
+ 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2',
+ 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2',
+ 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3',
+ 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13',
+ 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2',
+ 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2',
+ 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2',
+ 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3',
+ 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2',
+ 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'
+ :type vm_size: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizeTypes
+ """
+
+ _attribute_map = {
+ 'vm_size': {'key': 'vmSize', 'type': 'str'},
+ }
+
+ def __init__(self, *, vm_size=None, **kwargs) -> None:
+ super(HardwareProfile, self).__init__(**kwargs)
+ self.vm_size = vm_size
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image.py
index 54858e351db6..260c7c468d86 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image.py
@@ -20,13 +20,15 @@ class Image(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -61,8 +63,8 @@ class Image(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, location, tags=None, source_virtual_machine=None, storage_profile=None):
- super(Image, self).__init__(location=location, tags=tags)
- self.source_virtual_machine = source_virtual_machine
- self.storage_profile = storage_profile
+ 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/v2016_04_30_preview/models/image_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk.py
index b10d73ae0af0..d696f2804c4b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk.py
@@ -15,9 +15,11 @@
class ImageDataDisk(Model):
"""Describes a data disk.
- :param 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.
+ All required parameters must be populated in order to send to Azure.
+
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
:type lun: int
:param snapshot: The snapshot.
:type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
@@ -51,11 +53,11 @@ class ImageDataDisk(Model):
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
}
- def __init__(self, lun, snapshot=None, managed_disk=None, blob_uri=None, caching=None, disk_size_gb=None):
- super(ImageDataDisk, self).__init__()
- 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
+ def __init__(self, **kwargs):
+ super(ImageDataDisk, self).__init__(**kwargs)
+ self.lun = kwargs.get('lun', None)
+ self.snapshot = kwargs.get('snapshot', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
+ self.blob_uri = kwargs.get('blob_uri', None)
+ self.caching = kwargs.get('caching', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk_py3.py
new file mode 100644
index 000000000000..02a40d76f288
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_data_disk_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 ImageDataDisk(Model):
+ """Describes a data disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
+ :type lun: int
+ :param snapshot: The snapshot.
+ :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ :param managed_disk: The managedDisk.
+ :type managed_disk:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ :param blob_uri: The Virtual Hard Disk.
+ :type blob_uri: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
+ :param disk_size_gb: Specifies the size of empty data disks in gigabytes.
+ This element can be used to overwrite the name of the disk in a virtual
+ machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ }
+
+ _attribute_map = {
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'snapshot': {'key': 'snapshot', 'type': 'SubResource'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'},
+ 'blob_uri': {'key': 'blobUri', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ }
+
+ def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, **kwargs) -> None:
+ super(ImageDataDisk, self).__init__(**kwargs)
+ self.lun = lun
+ self.snapshot = snapshot
+ self.managed_disk = managed_disk
+ self.blob_uri = blob_uri
+ self.caching = caching
+ self.disk_size_gb = disk_size_gb
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference.py
index e3f08988c180..247d532379fc 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference.py
@@ -15,8 +15,10 @@
class ImageDiskReference(Model):
"""The source image used for creating the disk.
- :param id: A relative uri containing either a Platform Imgage Repository
- or user image reference.
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Required. A relative uri containing either a Platform Imgage
+ Repository or user image reference.
:type id: str
:param lun: If the disk is created from an image's data disk, this is an
index that indicates which of the data disks in the image to use. For OS
@@ -33,7 +35,7 @@ class ImageDiskReference(Model):
'lun': {'key': 'lun', 'type': 'int'},
}
- def __init__(self, id, lun=None):
- super(ImageDiskReference, self).__init__()
- self.id = id
- self.lun = lun
+ def __init__(self, **kwargs):
+ super(ImageDiskReference, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.lun = kwargs.get('lun', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_reference_py3.py
new file mode 100644
index 000000000000..191563557acb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_disk_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 ImageDiskReference(Model):
+ """The source image used for creating the disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Required. A relative uri containing either a Platform Imgage
+ Repository or user image reference.
+ :type id: str
+ :param lun: If the disk is created from an image's data disk, this is an
+ index that indicates which of the data disks in the image to use. For OS
+ disks, this field is null.
+ :type lun: int
+ """
+
+ _validation = {
+ 'id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'lun': {'key': 'lun', 'type': 'int'},
+ }
+
+ def __init__(self, *, id: str, lun: int=None, **kwargs) -> None:
+ super(ImageDiskReference, self).__init__(**kwargs)
+ self.id = id
+ self.lun = lun
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk.py
index 3995693859b1..98eea6ff040f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk.py
@@ -15,14 +15,16 @@
class ImageOSDisk(Model):
"""Describes an Operating System disk.
- :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 a custom image.
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_type: Required. This property allows you to specify the type of
+ the OS that is included in the disk if creating a VM from a custom image.
Possible values are:
**Windows**
**Linux**.
Possible values include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
- :param os_state: The OS State. Possible values include: 'Generalized',
- 'Specialized'
+ :param os_state: Required. The OS State. Possible values include:
+ 'Generalized', 'Specialized'
:type os_state: str or
~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemStateTypes
:param snapshot: The snapshot.
@@ -59,12 +61,12 @@ class ImageOSDisk(Model):
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
}
- def __init__(self, os_type, os_state, snapshot=None, managed_disk=None, blob_uri=None, caching=None, disk_size_gb=None):
- super(ImageOSDisk, self).__init__()
- 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
+ def __init__(self, **kwargs):
+ super(ImageOSDisk, self).__init__(**kwargs)
+ self.os_type = kwargs.get('os_type', None)
+ self.os_state = kwargs.get('os_state', None)
+ self.snapshot = kwargs.get('snapshot', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
+ self.blob_uri = kwargs.get('blob_uri', None)
+ self.caching = kwargs.get('caching', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk_py3.py
new file mode 100644
index 000000000000..1080364a701b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_os_disk_py3.py
@@ -0,0 +1,72 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class ImageOSDisk(Model):
+ """Describes an Operating System disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_type: Required. This property allows you to specify the type of
+ the OS that is included in the disk if creating a VM from a custom image.
+
Possible values are:
**Windows**
**Linux**.
+ Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
+ :param os_state: Required. The OS State. Possible values include:
+ 'Generalized', 'Specialized'
+ :type os_state: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemStateTypes
+ :param snapshot: The snapshot.
+ :type snapshot: ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ :param managed_disk: The managedDisk.
+ :type managed_disk:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ :param blob_uri: The Virtual Hard Disk.
+ :type blob_uri: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
+ :param disk_size_gb: Specifies the size of empty data disks in gigabytes.
+ This element can be used to overwrite the name of the disk in a virtual
+ machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ """
+
+ _validation = {
+ 'os_type': {'required': True},
+ 'os_state': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'},
+ 'snapshot': {'key': 'snapshot', 'type': 'SubResource'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'},
+ 'blob_uri': {'key': 'blobUri', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ }
+
+ def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, **kwargs) -> None:
+ super(ImageOSDisk, self).__init__(**kwargs)
+ self.os_type = os_type
+ self.os_state = os_state
+ self.snapshot = snapshot
+ self.managed_disk = managed_disk
+ self.blob_uri = blob_uri
+ self.caching = caching
+ self.disk_size_gb = disk_size_gb
diff --git a/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
new file mode 100644
index 000000000000..d035e3eb9106
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 import Resource
+
+
+class Image(Resource):
+ """The source user image virtual hard disk. The virtual hard disk will be
+ copied before being attached to the virtual machine. If SourceImage is
+ provided, the destination virtual hard drive must not exist.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param source_virtual_machine: The source virtual machine from which Image
+ is created.
+ :type source_virtual_machine:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ImageStorageProfile
+ :ivar provisioning_state: The provisioning state.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'},
+ 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None:
+ super(Image, self).__init__(location=location, tags=tags, **kwargs)
+ self.source_virtual_machine = source_virtual_machine
+ self.storage_profile = storage_profile
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference.py
index 9ec2177fa5ad..b8f929f4ad70 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_reference.py
@@ -46,9 +46,9 @@ class ImageReference(SubResource):
'version': {'key': 'version', 'type': 'str'},
}
- def __init__(self, id=None, publisher=None, offer=None, sku=None, version=None):
- super(ImageReference, self).__init__(id=id)
- self.publisher = publisher
- self.offer = offer
- self.sku = sku
- self.version = version
+ 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/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
new file mode 100644
index 000000000000..f44047d4c087
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 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/v2016_04_30_preview/models/image_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile.py
index 3645216ebfba..46d13c36255e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile.py
@@ -15,9 +15,11 @@
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
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_disk: Required. Specifies information about the operating system
+ disk used by the virtual machine.
For more information about
+ disks, see [About disks and VHDs for Azure virtual
machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
:type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.ImageOSDisk
:param data_disks: Specifies the parameters that are used to add a data
@@ -37,7 +39,7 @@ class ImageStorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'},
}
- def __init__(self, os_disk, data_disks=None):
- super(ImageStorageProfile, self).__init__()
- self.os_disk = os_disk
- self.data_disks = data_disks
+ def __init__(self, **kwargs):
+ super(ImageStorageProfile, self).__init__(**kwargs)
+ self.os_disk = kwargs.get('os_disk', None)
+ self.data_disks = kwargs.get('data_disks', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/image_storage_profile_py3.py
new file mode 100644
index 000000000000..7280e0fe8431
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_disk: Required. Specifies information about the operating system
+ disk used by the virtual machine.
For more information about
+ disks, see [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.ImageOSDisk
+ :param data_disks: Specifies the parameters that are used to add a data
+ disk to a virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type data_disks:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.ImageDataDisk]
+ """
+
+ _validation = {
+ 'os_disk': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'},
+ }
+
+ def __init__(self, *, os_disk, data_disks=None, **kwargs) -> None:
+ super(ImageStorageProfile, self).__init__(**kwargs)
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error.py
index de77683e2fc8..6324249d7c19 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error.py
@@ -26,7 +26,7 @@ class InnerError(Model):
'errordetail': {'key': 'errordetail', 'type': 'str'},
}
- def __init__(self, exceptiontype=None, errordetail=None):
- super(InnerError, self).__init__()
- self.exceptiontype = exceptiontype
- self.errordetail = errordetail
+ 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/v2016_04_30_preview/models/inner_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/inner_error_py3.py
new file mode 100644
index 000000000000..ccec30d7b53f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/instance_view_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status.py
index 9433ecb6d55a..6741b46ec8c2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status.py
@@ -38,10 +38,10 @@ class InstanceViewStatus(Model):
'time': {'key': 'time', 'type': 'iso-8601'},
}
- def __init__(self, code=None, level=None, display_status=None, message=None, time=None):
- super(InstanceViewStatus, self).__init__()
- self.code = code
- self.level = level
- self.display_status = display_status
- self.message = message
- self.time = time
+ 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/v2016_04_30_preview/models/instance_view_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/instance_view_status_py3.py
new file mode 100644
index 000000000000..44b6ee6e6ad4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.StatusLevelTypes
+ :param display_status: The short localizable label for the status.
+ :type display_status: str
+ :param message: The detailed status message, including for alerts and
+ error messages.
+ :type message: str
+ :param time: The time of the status.
+ :type time: datetime
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'level': {'key': 'level', 'type': 'StatusLevelTypes'},
+ 'display_status': {'key': 'displayStatus', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'time': {'key': 'time', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None:
+ super(InstanceViewStatus, self).__init__(**kwargs)
+ self.code = code
+ self.level = level
+ self.display_status = display_status
+ self.message = message
+ self.time = time
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference.py
index fe085cebcdb2..29021b7bf88d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference.py
@@ -16,11 +16,13 @@ class KeyVaultAndKeyReference(Model):
"""Key Vault Key Url and vault id of KeK, KeK is optional and when provided is
used to unwrap the encryptionKey.
- :param source_vault: Resource id of the KeyVault containing the key or
- secret
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
:type source_vault:
~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault
- :param key_url: Url pointing to a key or secret in KeyVault
+ :param key_url: Required. Url pointing to a key or secret in KeyVault
:type key_url: str
"""
@@ -34,7 +36,7 @@ class KeyVaultAndKeyReference(Model):
'key_url': {'key': 'keyUrl', 'type': 'str'},
}
- def __init__(self, source_vault, key_url):
- super(KeyVaultAndKeyReference, self).__init__()
- self.source_vault = source_vault
- self.key_url = key_url
+ def __init__(self, **kwargs):
+ super(KeyVaultAndKeyReference, self).__init__(**kwargs)
+ self.source_vault = kwargs.get('source_vault', None)
+ self.key_url = kwargs.get('key_url', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference_py3.py
new file mode 100644
index 000000000000..480a05b257a8
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_key_reference_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 KeyVaultAndKeyReference(Model):
+ """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is
+ used to unwrap the encryptionKey.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
+ :type source_vault:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault
+ :param key_url: Required. Url pointing to a key or secret in KeyVault
+ :type key_url: str
+ """
+
+ _validation = {
+ 'source_vault': {'required': True},
+ 'key_url': {'required': True},
+ }
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'},
+ 'key_url': {'key': 'keyUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, source_vault, key_url: str, **kwargs) -> None:
+ super(KeyVaultAndKeyReference, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.key_url = key_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference.py
index 476b88ec10e6..d1da7fb2acc6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference.py
@@ -15,11 +15,13 @@
class KeyVaultAndSecretReference(Model):
"""Key Vault Secret Url and vault id of the encryption key .
- :param source_vault: Resource id of the KeyVault containing the key or
- secret
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
:type source_vault:
~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault
- :param secret_url: Url pointing to a key or secret in KeyVault
+ :param secret_url: Required. Url pointing to a key or secret in KeyVault
:type secret_url: str
"""
@@ -33,7 +35,7 @@ class KeyVaultAndSecretReference(Model):
'secret_url': {'key': 'secretUrl', 'type': 'str'},
}
- def __init__(self, source_vault, secret_url):
- super(KeyVaultAndSecretReference, self).__init__()
- self.source_vault = source_vault
- self.secret_url = secret_url
+ def __init__(self, **kwargs):
+ super(KeyVaultAndSecretReference, self).__init__(**kwargs)
+ self.source_vault = kwargs.get('source_vault', None)
+ self.secret_url = kwargs.get('secret_url', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_reference_py3.py
new file mode 100644
index 000000000000..82c41657a74a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_and_secret_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 KeyVaultAndSecretReference(Model):
+ """Key Vault Secret Url and vault id of the encryption key .
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
+ :type source_vault:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SourceVault
+ :param secret_url: Required. Url pointing to a key or secret in KeyVault
+ :type secret_url: str
+ """
+
+ _validation = {
+ 'source_vault': {'required': True},
+ 'secret_url': {'required': True},
+ }
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'},
+ 'secret_url': {'key': 'secretUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None:
+ super(KeyVaultAndSecretReference, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.secret_url = secret_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference.py
index 5254881f968e..02437d2c77de 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference.py
@@ -15,9 +15,13 @@
class KeyVaultKeyReference(Model):
"""Describes a reference to Key Vault Key.
- :param key_url: The URL referencing a key encryption key in Key Vault.
+ 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: The relative URL of the Key Vault containing the key.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the key.
:type source_vault:
~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
"""
@@ -32,7 +36,7 @@ class KeyVaultKeyReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, key_url, source_vault):
- super(KeyVaultKeyReference, self).__init__()
- self.key_url = key_url
- self.source_vault = source_vault
+ 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/v2016_04_30_preview/models/key_vault_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference_py3.py
new file mode 100644
index 000000000000..fc711b0c6cad
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_key_reference_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 KeyVaultKeyReference(Model):
+ """Describes a reference to Key Vault Key.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param key_url: Required. The URL referencing a key encryption key in Key
+ Vault.
+ :type key_url: str
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the key.
+ :type source_vault:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ """
+
+ _validation = {
+ 'key_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key_url': {'key': 'keyUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, key_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultKeyReference, self).__init__(**kwargs)
+ self.key_url = key_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference.py
index 1372517bbd88..e478be625fe6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference.py
@@ -15,10 +15,12 @@
class KeyVaultSecretReference(Model):
"""Describes a reference to Key Vault Secret.
- :param secret_url: The URL referencing a secret in a Key Vault.
+ 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: The relative URL of the Key Vault containing the
- secret.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the secret.
:type source_vault:
~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
"""
@@ -33,7 +35,7 @@ class KeyVaultSecretReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, secret_url, source_vault):
- super(KeyVaultSecretReference, self).__init__()
- self.secret_url = secret_url
- self.source_vault = source_vault
+ 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/v2016_04_30_preview/models/key_vault_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_reference_py3.py
new file mode 100644
index 000000000000..cc17d1b9032c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/key_vault_secret_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 KeyVaultSecretReference(Model):
+ """Describes a reference to Key Vault Secret.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param secret_url: Required. The URL referencing a secret in a Key Vault.
+ :type secret_url: str
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the secret.
+ :type source_vault:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ """
+
+ _validation = {
+ 'secret_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'secret_url': {'key': 'secretUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultSecretReference, self).__init__(**kwargs)
+ self.secret_url = secret_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration.py
index fd6d7fde8c23..e8689ca503e9 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration.py
@@ -33,7 +33,7 @@ class LinuxConfiguration(Model):
'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
}
- def __init__(self, disable_password_authentication=None, ssh=None):
- super(LinuxConfiguration, self).__init__()
- self.disable_password_authentication = disable_password_authentication
- self.ssh = ssh
+ 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/v2016_04_30_preview/models/linux_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/linux_configuration_py3.py
new file mode 100644
index 000000000000..b0a3f0ee7a9a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.SshConfiguration
+ """
+
+ _attribute_map = {
+ 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'},
+ 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
+ }
+
+ def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None:
+ super(LinuxConfiguration, self).__init__(**kwargs)
+ self.disable_password_authentication = disable_password_authentication
+ self.ssh = ssh
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters.py
index 345999773408..aac844a7ebb5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/managed_disk_parameters.py
@@ -29,6 +29,6 @@ class ManagedDiskParameters(SubResource):
'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
}
- def __init__(self, id=None, storage_account_type=None):
- super(ManagedDiskParameters, self).__init__(id=id)
- self.storage_account_type = storage_account_type
+ 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/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
new file mode 100644
index 000000000000..ffce009881d2
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 import SubResource
+
+
+class ManagedDiskParameters(SubResource):
+ """The parameters of a managed disk.
+
+ :param id: Resource Id
+ :type id: str
+ :param storage_account_type: Specifies the storage account type for the
+ managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible
+ values include: 'Standard_LRS', 'Premium_LRS'
+ :type storage_account_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
+ }
+
+ def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None:
+ super(ManagedDiskParameters, self).__init__(id=id, **kwargs)
+ self.storage_account_type = storage_account_type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference.py
index 80c743c0d8e3..b86e305e3f74 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_interface_reference.py
@@ -27,6 +27,6 @@ class NetworkInterfaceReference(SubResource):
'primary': {'key': 'properties.primary', 'type': 'bool'},
}
- def __init__(self, id=None, primary=None):
- super(NetworkInterfaceReference, self).__init__(id=id)
- self.primary = primary
+ def __init__(self, **kwargs):
+ super(NetworkInterfaceReference, self).__init__(**kwargs)
+ self.primary = kwargs.get('primary', None)
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
new file mode 100644
index 000000000000..f42ead50fc36
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 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/v2016_04_30_preview/models/network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile.py
index 3a81557e34a6..467d6e5884cd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile.py
@@ -25,6 +25,6 @@ class NetworkProfile(Model):
'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
}
- def __init__(self, network_interfaces=None):
- super(NetworkProfile, self).__init__()
- self.network_interfaces = network_interfaces
+ 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/v2016_04_30_preview/models/network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/network_profile_py3.py
new file mode 100644
index 000000000000..cd9b6daa285b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.NetworkInterfaceReference]
+ """
+
+ _attribute_map = {
+ 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
+ }
+
+ def __init__(self, *, network_interfaces=None, **kwargs) -> None:
+ super(NetworkProfile, self).__init__(**kwargs)
+ self.network_interfaces = network_interfaces
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response.py
index 2f629aba0ef7..2cc7cf8104aa 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response.py
@@ -46,8 +46,8 @@ class OperationStatusResponse(Model):
'error': {'key': 'error', 'type': 'ApiError'},
}
- def __init__(self):
- super(OperationStatusResponse, self).__init__()
+ def __init__(self, **kwargs):
+ super(OperationStatusResponse, self).__init__(**kwargs)
self.name = None
self.status = None
self.start_time = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py
new file mode 100644
index 000000000000..f7713f697f70
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_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 OperationStatusResponse(Model):
+ """Operation status response.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: Operation ID
+ :vartype name: str
+ :ivar status: Operation status
+ :vartype status: str
+ :ivar start_time: Start time of the operation
+ :vartype start_time: datetime
+ :ivar end_time: End time of the operation
+ :vartype end_time: datetime
+ :ivar error: Api error
+ :vartype error: ~azure.mgmt.compute.v2016_04_30_preview.models.ApiError
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'status': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'end_time': {'readonly': True},
+ 'error': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'end_time': {'key': 'endTime', 'type': 'iso-8601'},
+ 'error': {'key': 'error', 'type': 'ApiError'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(OperationStatusResponse, self).__init__(**kwargs)
+ self.name = None
+ self.status = None
+ self.start_time = None
+ self.end_time = None
+ self.error = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk.py
index 14406d9e623c..cd7d915b62f1 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk.py
@@ -18,6 +18,8 @@ class OSDisk(Model):
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**
@@ -44,8 +46,8 @@ class OSDisk(Model):
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or
~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -79,14 +81,14 @@ class OSDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
}
- def __init__(self, create_option, os_type=None, encryption_settings=None, name=None, vhd=None, image=None, caching=None, disk_size_gb=None, managed_disk=None):
- super(OSDisk, self).__init__()
- self.os_type = os_type
- self.encryption_settings = encryption_settings
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = kwargs.get('os_type', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image.py
index 8498442accc8..71608314bd25 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image.py
@@ -15,8 +15,10 @@
class OSDiskImage(Model):
"""Contains the os disk image information.
- :param operating_system: The operating system of the osDiskImage. Possible
- values include: 'Windows', 'Linux'
+ All required parameters must be populated in order to send to Azure.
+
+ :param operating_system: Required. The operating system of the
+ osDiskImage. Possible values include: 'Windows', 'Linux'
:type operating_system: str or
~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
"""
@@ -29,6 +31,6 @@ class OSDiskImage(Model):
'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
}
- def __init__(self, operating_system):
- super(OSDiskImage, self).__init__()
- self.operating_system = operating_system
+ 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/v2016_04_30_preview/models/os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_image_py3.py
new file mode 100644
index 000000000000..2fffe8d56908
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.OperatingSystemTypes
+ """
+
+ _validation = {
+ 'operating_system': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
+ }
+
+ def __init__(self, *, operating_system, **kwargs) -> None:
+ super(OSDiskImage, self).__init__(**kwargs)
+ self.operating_system = operating_system
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_py3.py
new file mode 100644
index 000000000000..e8101921250d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_disk_py3.py
@@ -0,0 +1,94 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class OSDisk(Model):
+ """Specifies information about the operating system disk used by the virtual
+ machine.
For more information about disks, see [About disks and
+ VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
+ :param encryption_settings: Specifies the encryption settings for the OS
+ Disk.
Minimum api-version: 2015-06-15
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiskEncryptionSettings
+ :param name: The disk name.
+ :type name: str
+ :param vhd: The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the 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.v2016_04_30_preview.models.ManagedDiskParameters
+ """
+
+ _validation = {
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
+ }
+
+ def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = os_type
+ self.encryption_settings = encryption_settings
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile.py
index 4899a5ed4288..e9628746f12a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile.py
@@ -88,12 +88,12 @@ class OSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(OSProfile, self).__init__()
- 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
+ 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/v2016_04_30_preview/models/os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/os_profile_py3.py
new file mode 100644
index 000000000000..ed0589fc2776
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.WindowsConfiguration
+ :param linux_configuration: Specifies the Linux operating system settings
+ on the virtual machine.
For a list of supported Linux
+ distributions, see [Linux on Azure-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+
For running non-endorsed distributions, see [Information for
+ Non-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration
+ :param secrets: Specifies set of certificates that should be installed
+ onto the virtual machine.
+ :type secrets:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name': {'key': 'computerName', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(OSProfile, self).__init__(**kwargs)
+ self.computer_name = computer_name
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan.py
index 772160aef635..d42b6b32cfac 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan.py
@@ -38,9 +38,9 @@ class Plan(Model):
'promotion_code': {'key': 'promotionCode', 'type': 'str'},
}
- def __init__(self, name=None, publisher=None, product=None, promotion_code=None):
- super(Plan, self).__init__()
- self.name = name
- self.publisher = publisher
- self.product = product
- self.promotion_code = promotion_code
+ 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/v2016_04_30_preview/models/plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/plan_py3.py
new file mode 100644
index 000000000000..9cca2c78a123
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/purchase_plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan.py
index aa29cb02ab78..2e1509addca6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan.py
@@ -16,12 +16,15 @@ class PurchasePlan(Model):
"""Used for establishing the purchase context of any 3rd Party artifact
through MarketPlace.
- :param publisher: The publisher ID.
+ All required parameters must be populated in order to send to Azure.
+
+ :param publisher: Required. The publisher ID.
:type publisher: str
- :param name: The plan ID.
+ :param name: Required. The plan ID.
:type name: str
- :param product: Specifies the product of the image from the marketplace.
- This is the same value as Offer under the imageReference element.
+ :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
"""
@@ -37,8 +40,8 @@ class PurchasePlan(Model):
'product': {'key': 'product', 'type': 'str'},
}
- def __init__(self, publisher, name, product):
- super(PurchasePlan, self).__init__()
- self.publisher = publisher
- self.name = name
- self.product = product
+ 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/v2016_04_30_preview/models/purchase_plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/purchase_plan_py3.py
new file mode 100644
index 000000000000..26f7996f1633
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource.py
index 10269b591c68..5dd7d481c685 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource.py
@@ -18,13 +18,15 @@ class Resource(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -45,10 +47,10 @@ class Resource(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, location, tags=None):
- super(Resource, self).__init__()
+ def __init__(self, **kwargs):
+ super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
- self.location = location
- self.tags = tags
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_py3.py
new file mode 100644
index 000000000000..2f3702caf609
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/resource_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update.py
index daa416f69c6d..182590bbdd32 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update.py
@@ -23,6 +23,6 @@ class ResourceUpdate(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, tags=None):
- super(ResourceUpdate, self).__init__()
- self.tags = tags
+ def __init__(self, **kwargs):
+ super(ResourceUpdate, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update_py3.py
new file mode 100644
index 000000000000..12e233958bf3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/resource_update_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 ResourceUpdate(Model):
+ """The Resource model definition.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, tags=None, **kwargs) -> None:
+ super(ResourceUpdate, self).__init__(**kwargs)
+ self.tags = tags
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku.py
index 16755dc57b65..5c07709435e0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku.py
@@ -31,8 +31,8 @@ class Sku(Model):
'capacity': {'key': 'capacity', 'type': 'long'},
}
- def __init__(self, name=None, tier=None, capacity=None):
- super(Sku, self).__init__()
- self.name = name
- self.tier = tier
- self.capacity = capacity
+ 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/v2016_04_30_preview/models/sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sku_py3.py
new file mode 100644
index 000000000000..f6bc74afaadc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/snapshot.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot.py
index fa34f3334d38..df7821821099 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot.py
@@ -18,13 +18,15 @@ class Snapshot(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -38,8 +40,8 @@ class Snapshot(Resource):
'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
- :param creation_data: Disk source information. CreationData information
- cannot be changed after the disk has been created.
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
:type creation_data:
~azure.mgmt.compute.v2016_04_30_preview.models.CreationData
:param disk_size_gb: If creationData.createOption is Empty, this field is
@@ -85,13 +87,13 @@ class Snapshot(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, location, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb=None, encryption_settings=None):
- super(Snapshot, self).__init__(location=location, tags=tags)
- self.account_type = account_type
+ def __init__(self, **kwargs):
+ super(Snapshot, self).__init__(**kwargs)
+ self.account_type = kwargs.get('account_type', None)
self.time_created = None
- self.os_type = os_type
- self.creation_data = creation_data
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ self.os_type = kwargs.get('os_type', None)
+ self.creation_data = kwargs.get('creation_data', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
self.owner_id = None
self.provisioning_state = None
diff --git a/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
new file mode 100644
index 000000000000..325b6544e35e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_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 .resource import Resource
+
+
+class Snapshot(Resource):
+ """Snapshot resource.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param account_type: the storage account type of the disk. Possible values
+ include: 'Standard_LRS', 'Premium_LRS'
+ :type account_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes
+ :ivar time_created: The time when the disk was created.
+ :vartype time_created: datetime
+ :param os_type: The Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
+ :type creation_data:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings
+ :ivar owner_id: A relative URI containing the VM id that has the disk
+ attached.
+ :vartype owner_id: str
+ :ivar provisioning_state: The disk provisioning state.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'time_created': {'readonly': True},
+ 'creation_data': {'required': True},
+ 'owner_id': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ 'owner_id': {'key': 'properties.ownerId', 'type': 'str'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, creation_data, tags=None, account_type=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(Snapshot, self).__init__(location=location, tags=tags, **kwargs)
+ self.account_type = account_type
+ self.time_created = None
+ self.os_type = os_type
+ self.creation_data = creation_data
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
+ self.owner_id = None
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update.py
index 18ba23de1637..2cfe88c7a138 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update.py
@@ -49,10 +49,10 @@ class SnapshotUpdate(ResourceUpdate):
'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
}
- def __init__(self, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb=None, encryption_settings=None):
- super(SnapshotUpdate, self).__init__(tags=tags)
- self.account_type = account_type
- self.os_type = os_type
- self.creation_data = creation_data
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ def __init__(self, **kwargs):
+ super(SnapshotUpdate, self).__init__(**kwargs)
+ self.account_type = kwargs.get('account_type', None)
+ self.os_type = kwargs.get('os_type', None)
+ self.creation_data = kwargs.get('creation_data', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
diff --git a/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
new file mode 100644
index 000000000000..22c491d39f6a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_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 .resource_update import ResourceUpdate
+
+
+class SnapshotUpdate(ResourceUpdate):
+ """Snapshot update resource.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param account_type: the storage account type of the disk. Possible values
+ include: 'Standard_LRS', 'Premium_LRS'
+ :type account_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.StorageAccountTypes
+ :param os_type: the Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
+ :param creation_data: disk source information. CreationData information
+ cannot be changed after the disk has been created.
+ :type creation_data:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CreationData
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.EncryptionSettings
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'account_type': {'key': 'properties.accountType', 'type': 'StorageAccountTypes'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ }
+
+ def __init__(self, *, tags=None, account_type=None, os_type=None, creation_data=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(SnapshotUpdate, self).__init__(tags=tags, **kwargs)
+ self.account_type = account_type
+ self.os_type = os_type
+ self.creation_data = creation_data
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault.py
index 5f242d159d4c..9b16302ebbfb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault.py
@@ -24,6 +24,6 @@ class SourceVault(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(SourceVault, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(SourceVault, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault_py3.py
new file mode 100644
index 000000000000..13eea5461390
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/source_vault_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 SourceVault(Model):
+ """The vault id is an Azure Resource Manager Resoure id in the form
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}.
+
+ :param id: Resource Id
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(self, *, id: str=None, **kwargs) -> None:
+ super(SourceVault, self).__init__(**kwargs)
+ self.id = id
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py
index e3e048c3ec41..4a11025a5587 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration.py
@@ -25,6 +25,6 @@ class SshConfiguration(Model):
'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
}
- def __init__(self, public_keys=None):
- super(SshConfiguration, self).__init__()
- self.public_keys = public_keys
+ 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/v2016_04_30_preview/models/ssh_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_configuration_py3.py
new file mode 100644
index 000000000000..a1a49cff031b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.SshPublicKey]
+ """
+
+ _attribute_map = {
+ 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
+ }
+
+ def __init__(self, *, public_keys=None, **kwargs) -> None:
+ super(SshConfiguration, self).__init__(**kwargs)
+ self.public_keys = public_keys
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key.py
index 2fe6756641cb..122e0d3b9fdd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key.py
@@ -33,7 +33,7 @@ class SshPublicKey(Model):
'key_data': {'key': 'keyData', 'type': 'str'},
}
- def __init__(self, path=None, key_data=None):
- super(SshPublicKey, self).__init__()
- self.path = path
- self.key_data = key_data
+ 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/v2016_04_30_preview/models/ssh_public_key_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/ssh_public_key_py3.py
new file mode 100644
index 000000000000..b16ee085b36b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile.py
index cc20b2b9650f..0664920689d6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile.py
@@ -41,8 +41,8 @@ class StorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
}
- def __init__(self, image_reference=None, os_disk=None, data_disks=None):
- super(StorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
- self.data_disks = data_disks
+ 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/v2016_04_30_preview/models/storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile_py3.py
new file mode 100644
index 000000000000..ba1f2d046eb0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/storage_profile_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 StorageProfile(Model):
+ """Specifies the storage settings for the virtual machine disks.
+
+ :param image_reference: Specifies information about the image to use. You
+ can specify information about platform images, marketplace images, or
+ virtual machine images. This element is required when you want to use a
+ platform image, marketplace image, or virtual machine image, but is not
+ used in other creation operations.
+ :type image_reference:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference
+ :param os_disk: Specifies information about the operating system disk used
+ by the virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type os_disk: ~azure.mgmt.compute.v2016_04_30_preview.models.OSDisk
+ :param data_disks: Specifies the parameters that are used to add a data
+ disk to a virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type data_disks:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDisk]
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None:
+ super(StorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource.py
index b32875f54c8e..11e092cc6ff5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource.py
@@ -23,6 +23,6 @@ class SubResource(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(SubResource, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(SubResource, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_py3.py
new file mode 100644
index 000000000000..29e5afee38f9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/sub_resource_read_only.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only.py
index 308c52a8420b..4a0ec466c0d4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only.py
@@ -30,6 +30,6 @@ class SubResourceReadOnly(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self):
- super(SubResourceReadOnly, self).__init__()
+ def __init__(self, **kwargs):
+ super(SubResourceReadOnly, self).__init__(**kwargs)
self.id = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/sub_resource_read_only_py3.py
new file mode 100644
index 000000000000..cb918e9a2ac6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy.py
index af47573311d1..13b677d84ff4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy.py
@@ -29,6 +29,6 @@ class UpgradePolicy(Model):
'mode': {'key': 'mode', 'type': 'UpgradeMode'},
}
- def __init__(self, mode=None):
- super(UpgradePolicy, self).__init__()
- self.mode = mode
+ def __init__(self, **kwargs):
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = kwargs.get('mode', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy_py3.py
new file mode 100644
index 000000000000..2c344e88f74d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/upgrade_policy_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 UpgradePolicy(Model):
+ """Describes an upgrade policy - automatic or manual.
+
+ :param mode: Specifies the mode of an upgrade to virtual machines in the
+ scale set.
Possible values are:
**Manual** - You
+ control the application of updates to virtual machines in the scale set.
+ You do this by using the manualUpgrade action.
**Automatic** -
+ All virtual machines in the scale set are automatically updated at the
+ same time. Possible values include: 'Automatic', 'Manual'
+ :type mode: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradeMode
+ """
+
+ _attribute_map = {
+ 'mode': {'key': 'mode', 'type': 'UpgradeMode'},
+ }
+
+ def __init__(self, *, mode=None, **kwargs) -> None:
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = mode
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage.py
index 91331bc73635..019b6efc0669 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage.py
@@ -18,14 +18,16 @@ class Usage(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
- :ivar unit: An enum describing the unit of usage measurement. Default
- value: "Count" .
+ 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: The current usage of the resource.
+ :param current_value: Required. The current usage of the resource.
:type current_value: int
- :param limit: The maximum permitted usage of the resource.
+ :param limit: Required. The maximum permitted usage of the resource.
:type limit: long
- :param name: The name of the type of usage.
+ :param name: Required. The name of the type of usage.
:type name: ~azure.mgmt.compute.v2016_04_30_preview.models.UsageName
"""
@@ -45,8 +47,8 @@ class Usage(Model):
unit = "Count"
- def __init__(self, current_value, limit, name):
- super(Usage, self).__init__()
- self.current_value = current_value
- self.limit = limit
- self.name = name
+ 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/v2016_04_30_preview/models/usage_name.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name.py
index 799c1f896da3..e2560936493e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name.py
@@ -26,7 +26,7 @@ class UsageName(Model):
'localized_value': {'key': 'localizedValue', 'type': 'str'},
}
- def __init__(self, value=None, localized_value=None):
- super(UsageName, self).__init__()
- self.value = value
- self.localized_value = localized_value
+ 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/v2016_04_30_preview/models/usage_name_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_name_py3.py
new file mode 100644
index 000000000000..ad0b77459f75
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/usage_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/usage_py3.py
new file mode 100644
index 000000000000..b33df6c9101d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.UsageName
+ """
+
+ _validation = {
+ 'unit': {'required': True, 'constant': True},
+ 'current_value': {'required': True},
+ 'limit': {'required': True},
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'unit': {'key': 'unit', 'type': 'str'},
+ 'current_value': {'key': 'currentValue', 'type': 'int'},
+ 'limit': {'key': 'limit', 'type': 'long'},
+ 'name': {'key': 'name', 'type': 'UsageName'},
+ }
+
+ unit = "Count"
+
+ def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None:
+ super(Usage, self).__init__(**kwargs)
+ self.current_value = current_value
+ self.limit = limit
+ self.name = name
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate.py
index 8d4d05955de4..b173def6f820 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate.py
@@ -40,7 +40,7 @@ class VaultCertificate(Model):
'certificate_store': {'key': 'certificateStore', 'type': 'str'},
}
- def __init__(self, certificate_url=None, certificate_store=None):
- super(VaultCertificate, self).__init__()
- self.certificate_url = certificate_url
- self.certificate_store = certificate_store
+ 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/v2016_04_30_preview/models/vault_certificate_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_certificate_py3.py
new file mode 100644
index 000000000000..eda5ba1c3f1d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/vault_secret_group.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group.py
index 36ba25a6fde9..9d73e6eb8016 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group.py
@@ -30,7 +30,7 @@ class VaultSecretGroup(Model):
'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
}
- def __init__(self, source_vault=None, vault_certificates=None):
- super(VaultSecretGroup, self).__init__()
- self.source_vault = source_vault
- self.vault_certificates = vault_certificates
+ 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/v2016_04_30_preview/models/vault_secret_group_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group_py3.py
new file mode 100644
index 000000000000..955f9a828118
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/vault_secret_group_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 VaultSecretGroup(Model):
+ """Describes a set of certificates which are all in the same Key Vault.
+
+ :param source_vault: The relative URL of the Key Vault containing all of
+ the certificates in VaultCertificates.
+ :type source_vault:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.SubResource
+ :param vault_certificates: The list of key vault references in SourceVault
+ which contain certificates.
+ :type vault_certificates:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultCertificate]
+ """
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
+ }
+
+ def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None:
+ super(VaultSecretGroup, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.vault_certificates = vault_certificates
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk.py
index af1725d302af..5e3ad9dea7d4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk.py
@@ -23,6 +23,6 @@ class VirtualHardDisk(Model):
'uri': {'key': 'uri', 'type': 'str'},
}
- def __init__(self, uri=None):
- super(VirtualHardDisk, self).__init__()
- self.uri = uri
+ def __init__(self, **kwargs):
+ super(VirtualHardDisk, self).__init__(**kwargs)
+ self.uri = kwargs.get('uri', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_hard_disk_py3.py
new file mode 100644
index 000000000000..9c069b95f084
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/virtual_machine.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine.py
index a361c2bd9cd7..ea4dfa0d70c2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine.py
@@ -18,13 +18,15 @@ class VirtualMachine(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -128,18 +130,18 @@ class VirtualMachine(Resource):
'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'},
}
- def __init__(self, location, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type=None, identity=None):
- super(VirtualMachine, self).__init__(location=location, tags=tags)
- 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
+ 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 = license_type
+ self.license_type = kwargs.get('license_type', None)
self.vm_id = None
self.resources = None
- self.identity = identity
+ self.identity = kwargs.get('identity', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view.py
index 9584fa6e35cb..f6d0fc9a94ea 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view.py
@@ -32,8 +32,8 @@ class VirtualMachineAgentInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, vm_agent_version=None, extension_handlers=None, statuses=None):
- super(VirtualMachineAgentInstanceView, self).__init__()
- self.vm_agent_version = vm_agent_version
- self.extension_handlers = extension_handlers
- self.statuses = statuses
+ 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/v2016_04_30_preview/models/virtual_machine_agent_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_agent_instance_view_py3.py
new file mode 100644
index 000000000000..9b301b73086b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.VirtualMachineExtensionHandlerInstanceView]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'},
+ 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineAgentInstanceView, self).__init__(**kwargs)
+ self.vm_agent_version = vm_agent_version
+ self.extension_handlers = extension_handlers
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters.py
index b406f387ffed..4e6ffbea7a4f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters.py
@@ -15,12 +15,15 @@
class VirtualMachineCaptureParameters(Model):
"""Capture Virtual Machine parameters.
- :param vhd_prefix: The captured virtual hard disk's name prefix.
+ 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: The destination container name.
+ :param destination_container_name: Required. The destination container
+ name.
:type destination_container_name: str
- :param overwrite_vhds: Specifies whether to overwrite the destination
- virtual hard disk, in case of conflict.
+ :param overwrite_vhds: Required. Specifies whether to overwrite the
+ destination virtual hard disk, in case of conflict.
:type overwrite_vhds: bool
"""
@@ -36,8 +39,8 @@ class VirtualMachineCaptureParameters(Model):
'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'},
}
- def __init__(self, vhd_prefix, destination_container_name, overwrite_vhds):
- super(VirtualMachineCaptureParameters, self).__init__()
- self.vhd_prefix = vhd_prefix
- self.destination_container_name = destination_container_name
- self.overwrite_vhds = overwrite_vhds
+ 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/v2016_04_30_preview/models/virtual_machine_capture_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_parameters_py3.py
new file mode 100644
index 000000000000..1866cdc23300
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/virtual_machine_capture_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result.py
index 95e26a427e83..2b0df7406a34 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result.py
@@ -26,6 +26,6 @@ class VirtualMachineCaptureResult(SubResource):
'output': {'key': 'properties.output', 'type': 'object'},
}
- def __init__(self, id=None, output=None):
- super(VirtualMachineCaptureResult, self).__init__(id=id)
- self.output = output
+ def __init__(self, **kwargs):
+ super(VirtualMachineCaptureResult, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
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
new file mode 100644
index 000000000000..da449b8e9154
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_capture_result_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 .sub_resource import SubResource
+
+
+class VirtualMachineCaptureResult(SubResource):
+ """Resource Id.
+
+ :param id: Resource Id
+ :type id: str
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'output': {'key': 'properties.output', 'type': 'object'},
+ }
+
+ def __init__(self, *, id: str=None, output=None, **kwargs) -> None:
+ super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension.py
index db57cede0e42..fb00bd780b7a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension.py
@@ -18,13 +18,15 @@ class VirtualMachineExtension(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -82,14 +84,14 @@ class VirtualMachineExtension(Resource):
'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
}
- def __init__(self, location, tags=None, force_update_tag=None, publisher=None, virtual_machine_extension_type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None, instance_view=None):
- super(VirtualMachineExtension, self).__init__(location=location, tags=tags)
- 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
+ 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 = instance_view
+ self.instance_view = kwargs.get('instance_view', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view.py
index f26b64f29d7e..411bcf8c9fe4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view.py
@@ -31,8 +31,8 @@ class VirtualMachineExtensionHandlerInstanceView(Model):
'status': {'key': 'status', 'type': 'InstanceViewStatus'},
}
- def __init__(self, type=None, type_handler_version=None, status=None):
- super(VirtualMachineExtensionHandlerInstanceView, self).__init__()
- self.type = type
- self.type_handler_version = type_handler_version
- self.status = status
+ 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/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view_py3.py
new file mode 100644
index 000000000000..6b66bc5fa5c1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_handler_instance_view_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 VirtualMachineExtensionHandlerInstanceView(Model):
+ """The instance view of a virtual machine extension handler.
+
+ :param type: Specifies the type of the extension; an example is
+ "CustomScriptExtension".
+ :type type: str
+ :param type_handler_version: Specifies the version of the script handler.
+ :type type_handler_version: str
+ :param status: The extension handler status.
+ :type status:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'InstanceViewStatus'},
+ }
+
+ def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None:
+ super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs)
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.status = status
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image.py
index 7614699a78da..7273e2b84754 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_image.py
@@ -18,23 +18,26 @@ class VirtualMachineExtensionImage(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
- :param operating_system: The operating system this extension supports.
- :type operating_system: str
- :param compute_role: The type of role (IaaS or PaaS) this extension
+ :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: The schema defined by publisher, where extension
- consumers should provide settings in a matching schema.
+ :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
@@ -69,10 +72,10 @@ class VirtualMachineExtensionImage(Resource):
'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'},
}
- def __init__(self, location, operating_system, compute_role, handler_schema, tags=None, vm_scale_set_enabled=None, supports_multiple_extensions=None):
- super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags)
- 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
+ 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/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
new file mode 100644
index 000000000000..217accab02f0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 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/v2016_04_30_preview/models/virtual_machine_extension_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view.py
index 4ef45c135f01..7dd1fb0572e8 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view.py
@@ -38,10 +38,10 @@ class VirtualMachineExtensionInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, type=None, type_handler_version=None, substatuses=None, statuses=None):
- super(VirtualMachineExtensionInstanceView, self).__init__()
- self.name = name
- self.type = type
- self.type_handler_version = type_handler_version
- self.substatuses = substatuses
- self.statuses = statuses
+ 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/v2016_04_30_preview/models/virtual_machine_extension_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_extension_instance_view_py3.py
new file mode 100644
index 000000000000..4ac3c8b0af49
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.InstanceViewStatus]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.substatuses = substatuses
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..342cb444d9ce
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 import Resource
+
+
+class VirtualMachineExtension(Resource):
+ """Describes a Virtual Machine Extension.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param force_update_tag: How the extension handler should be forced to
+ update even if the extension configuration has not changed.
+ :type force_update_tag: str
+ :param publisher: The name of the extension handler publisher.
+ :type publisher: str
+ :param virtual_machine_extension_type: Specifies the type of the
+ extension; an example is "CustomScriptExtension".
+ :type virtual_machine_extension_type: str
+ :param type_handler_version: Specifies the version of the script handler.
+ :type type_handler_version: str
+ :param auto_upgrade_minor_version: Indicates whether the extension should
+ use a newer minor version if one is available at deployment time. Once
+ deployed, however, the extension will not upgrade minor versions unless
+ redeployed, even with this property set to true.
+ :type auto_upgrade_minor_version: bool
+ :param settings: Json formatted public settings for the extension.
+ :type settings: object
+ :param protected_settings: The extension can contain either
+ protectedSettings or protectedSettingsFromKeyVault or no protected
+ settings at all.
+ :type protected_settings: object
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param instance_view: The virtual machine extension instance view.
+ :type instance_view:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
+ 'publisher': {'key': 'properties.publisher', 'type': 'str'},
+ 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'},
+ 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'},
+ 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'},
+ 'settings': {'key': 'properties.settings', 'type': 'object'},
+ 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
+ }
+
+ def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None:
+ super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs)
+ self.force_update_tag = force_update_tag
+ self.publisher = publisher
+ self.virtual_machine_extension_type = virtual_machine_extension_type
+ self.type_handler_version = type_handler_version
+ self.auto_upgrade_minor_version = auto_upgrade_minor_version
+ self.settings = settings
+ self.protected_settings = protected_settings
+ self.provisioning_state = None
+ self.instance_view = instance_view
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity.py
index 913554c1a461..84be2bbe01e2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity.py
@@ -40,8 +40,8 @@ class VirtualMachineIdentity(Model):
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
}
- def __init__(self, type=None):
- super(VirtualMachineIdentity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
- self.type = type
+ self.type = kwargs.get('type', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity_py3.py
new file mode 100644
index 000000000000..bfd1ec6626bc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_identity_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 VirtualMachineIdentity(Model):
+ """Identity for the virtual machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of virtual machine identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id associated with the virtual machine.
+ :vartype tenant_id: str
+ :param type: The type of identity used for the virtual machine. Currently,
+ the only supported type is 'SystemAssigned', which implicitly creates an
+ identity. Possible values include: 'SystemAssigned'
+ :type type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ResourceIdentityType'},
+ }
+
+ def __init__(self, *, type=None, **kwargs) -> None:
+ super(VirtualMachineIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image.py
index a7bff780485a..32853c04e51c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -51,8 +53,8 @@ class VirtualMachineImage(VirtualMachineImageResource):
'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
}
- def __init__(self, name, location, id=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None):
- super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags)
- self.plan = plan
- self.os_disk_image = os_disk_image
- self.data_disk_images = data_disk_images
+ 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/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
new file mode 100644
index 000000000000..04d6563b63b3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_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 .virtual_machine_image_resource import VirtualMachineImageResource
+
+
+class VirtualMachineImage(VirtualMachineImageResource):
+ """Describes a Virtual Machine Image.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The name of the resource.
+ :type name: str
+ :param location: Required. The supported Azure location of the resource.
+ :type location: str
+ :param tags: Specifies the tags that are assigned to the virtual machine.
+ For more information about using tags, see [Using tags to organize your
+ Azure
+ resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
+ :type tags: dict[str, str]
+ :param plan:
+ :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.PurchasePlan
+ :param os_disk_image:
+ :type os_disk_image:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OSDiskImage
+ :param data_disk_images:
+ :type data_disk_images:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.DataDiskImage]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'},
+ 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'},
+ 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
+ }
+
+ def __init__(self, *, 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/v2016_04_30_preview/models/virtual_machine_image_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource.py
index a7029041061d..8807cc8f391b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_image_resource.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -40,8 +42,8 @@ class VirtualMachineImageResource(SubResource):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, name, location, id=None, tags=None):
- super(VirtualMachineImageResource, self).__init__(id=id)
- self.name = name
- self.location = location
- self.tags = tags
+ 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/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
new file mode 100644
index 000000000000..48a968bf2fbf
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 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/v2016_04_30_preview/models/virtual_machine_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view.py
index dbc075baaeba..c1e4c785527b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view.py
@@ -55,13 +55,13 @@ class VirtualMachineInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None):
- super(VirtualMachineInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.disks = disks
- self.extensions = extensions
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
+ self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view_py3.py
new file mode 100644
index 000000000000..323a0e109a7a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_instance_view_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 VirtualMachineInstanceView(Model):
+ """The instance view of a virtual machine.
+
+ :param platform_update_domain: Specifies the update domain of the virtual
+ machine.
+ :type platform_update_domain: int
+ :param platform_fault_domain: Specifies the fault domain of the virtual
+ machine.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView
+ :param disks: The virtual machine disk information.
+ :type disks:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView]
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2016_04_30_preview.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.disks = disks
+ self.extensions = extensions
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..c34a5e057c9a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_py3.py
@@ -0,0 +1,147 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class VirtualMachine(Resource):
+ """Describes a Virtual Machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2016_04_30_preview.models.SubResource
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineInstanceView
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier
+ that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read
+ using platform BIOS commands.
+ :vartype vm_id: str
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]
+ :param identity: The identity of the virtual machine, if configured.
+ :type identity:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineIdentity
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'vm_id': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'plan', 'type': 'Plan'},
+ 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'},
+ 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'},
+ 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'},
+ 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'},
+ 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'},
+ 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'},
+ 'license_type': {'key': 'properties.licenseType', 'type': 'str'},
+ 'vm_id': {'key': 'properties.vmId', 'type': 'str'},
+ 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
+ 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'},
+ }
+
+ def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, **kwargs) -> None:
+ super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs)
+ self.plan = plan
+ self.hardware_profile = hardware_profile
+ self.storage_profile = storage_profile
+ self.os_profile = os_profile
+ self.network_profile = network_profile
+ self.diagnostics_profile = diagnostics_profile
+ self.availability_set = availability_set
+ self.provisioning_state = None
+ self.instance_view = None
+ self.license_type = license_type
+ self.vm_id = None
+ self.resources = None
+ self.identity = identity
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set.py
index 00ec7e9ea9dd..30ccec128f7a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -83,13 +85,13 @@ class VirtualMachineScaleSet(Resource):
'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
}
- def __init__(self, location, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, over_provision=None, single_placement_group=None, identity=None):
- super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags)
- self.sku = sku
- self.plan = plan
- self.upgrade_policy = upgrade_policy
- self.virtual_machine_profile = virtual_machine_profile
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSet, self).__init__(**kwargs)
+ self.sku = kwargs.get('sku', None)
+ self.plan = kwargs.get('plan', None)
+ self.upgrade_policy = kwargs.get('upgrade_policy', None)
+ self.virtual_machine_profile = kwargs.get('virtual_machine_profile', None)
self.provisioning_state = None
- self.over_provision = over_provision
- self.single_placement_group = single_placement_group
- self.identity = identity
+ self.over_provision = kwargs.get('over_provision', None)
+ self.single_placement_group = kwargs.get('single_placement_group', None)
+ self.identity = kwargs.get('identity', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk.py
index f827f03a7af1..52812568311f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk.py
@@ -15,11 +15,13 @@
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: 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.
+ :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**
@@ -27,8 +29,8 @@ class VirtualMachineScaleSetDataDisk(Model):
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or
~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
- :param create_option: The create option. Possible values include:
- 'FromImage', 'Empty', 'Attach'
+ :param create_option: Required. The create option. Possible values
+ include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes
:param disk_size_gb: Specifies the size of an empty data disk in
@@ -54,11 +56,11 @@ class VirtualMachineScaleSetDataDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
}
- def __init__(self, lun, create_option, name=None, caching=None, disk_size_gb=None, managed_disk=None):
- super(VirtualMachineScaleSetDataDisk, self).__init__()
- self.name = name
- self.lun = lun
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.lun = kwargs.get('lun', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk_py3.py
new file mode 100644
index 000000000000..d591a546afa4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_data_disk_py3.py
@@ -0,0 +1,66 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetDataDisk(Model):
+ """Describes a virtual machine scale set data disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: The disk name.
+ :type name: str
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
+ :type lun: int
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
+ :param create_option: Required. The create option. Possible values
+ include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the 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.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
+ }
+
+ def __init__(self, *, lun: int, create_option, name: str=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs)
+ self.name = name
+ self.lun = lun
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension.py
index 5097197e4f72..29bc30c1f021 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension.py
@@ -62,13 +62,13 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, name=None, publisher=None, type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None):
- super(VirtualMachineScaleSetExtension, self).__init__()
- self.name = name
- self.publisher = publisher
- self.type = type
- self.type_handler_version = type_handler_version
- self.auto_upgrade_minor_version = auto_upgrade_minor_version
- self.settings = settings
- self.protected_settings = protected_settings
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetExtension, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.publisher = kwargs.get('publisher', None)
+ self.type = kwargs.get('type', None)
+ self.type_handler_version = kwargs.get('type_handler_version', None)
+ self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None)
+ self.settings = kwargs.get('settings', None)
+ self.protected_settings = kwargs.get('protected_settings', None)
self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py
index 89e35f636351..6dcf2ea9bc9c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetExtensionProfile(Model):
'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
}
- def __init__(self, extensions=None):
- super(VirtualMachineScaleSetExtensionProfile, self).__init__()
- self.extensions = extensions
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = kwargs.get('extensions', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile_py3.py
new file mode 100644
index 000000000000..7136c80608a0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.VirtualMachineScaleSetExtension]
+ """
+
+ _attribute_map = {
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
+ }
+
+ def __init__(self, *, extensions=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = extensions
diff --git a/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
new file mode 100644
index 000000000000..456edba974fe
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_py3.py
@@ -0,0 +1,74 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .sub_resource_read_only import SubResourceReadOnly
+
+
+class VirtualMachineScaleSetExtension(SubResourceReadOnly):
+ """Describes a Virtual Machine Scale Set Extension.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :param name: The name of the extension.
+ :type name: str
+ :param publisher: The name of the extension handler publisher.
+ :type publisher: str
+ :param type: Specifies the type of the extension; an example is
+ "CustomScriptExtension".
+ :type type: str
+ :param type_handler_version: Specifies the version of the script handler.
+ :type type_handler_version: str
+ :param auto_upgrade_minor_version: Indicates whether the extension should
+ use a newer minor version if one is available at deployment time. Once
+ deployed, however, the extension will not upgrade minor versions unless
+ redeployed, even with this property set to true.
+ :type auto_upgrade_minor_version: bool
+ :param settings: Json formatted public settings for the extension.
+ :type settings: object
+ :param protected_settings: The extension can contain either
+ protectedSettings or protectedSettingsFromKeyVault or no protected
+ settings at all.
+ :type protected_settings: object
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'publisher': {'key': 'properties.publisher', 'type': 'str'},
+ 'type': {'key': 'properties.type', 'type': 'str'},
+ 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'},
+ 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'},
+ 'settings': {'key': 'properties.settings', 'type': 'object'},
+ 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, name: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetExtension, self).__init__(, **kwargs)
+ self.name = name
+ self.publisher = publisher
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.auto_upgrade_minor_version = auto_upgrade_minor_version
+ self.settings = settings
+ self.protected_settings = protected_settings
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity.py
index 8c8f38096f02..a7b9883fa459 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity.py
@@ -42,8 +42,8 @@ class VirtualMachineScaleSetIdentity(Model):
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
}
- def __init__(self, type=None):
- super(VirtualMachineScaleSetIdentity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
- self.type = type
+ self.type = kwargs.get('type', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity_py3.py
new file mode 100644
index 000000000000..55fb61687b44
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_identity_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 VirtualMachineScaleSetIdentity(Model):
+ """Identity for the virtual machine scale set.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of virtual machine scale set
+ identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id associated with the virtual machine scale
+ set.
+ :vartype tenant_id: str
+ :param type: The type of identity used for the virtual machine scale set.
+ Currently, the only supported type is 'SystemAssigned', which implicitly
+ creates an identity. Possible values include: 'SystemAssigned'
+ :type type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ResourceIdentityType
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ResourceIdentityType'},
+ }
+
+ def __init__(self, *, type=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view.py
index d8327a266dbf..fc73a188243f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view.py
@@ -41,8 +41,8 @@ class VirtualMachineScaleSetInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, statuses=None):
- super(VirtualMachineScaleSetInstanceView, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
self.virtual_machine = None
self.extensions = None
- self.statuses = statuses
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_py3.py
new file mode 100644
index 000000000000..6f7a4431de39
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceViewStatusesSummary
+ :ivar extensions: The extensions information.
+ :vartype extensions:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMExtensionsSummary]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus]
+ """
+
+ _validation = {
+ 'virtual_machine': {'readonly': True},
+ 'extensions': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, statuses=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
+ self.virtual_machine = None
+ self.extensions = None
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary.py
index f734dca4d057..aaf29fceeb65 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary.py
@@ -32,6 +32,6 @@ class VirtualMachineScaleSetInstanceViewStatusesSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py
new file mode 100644
index 000000000000..bd92330e549b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration.py
index 11a14397fe70..98b86fbcfc7c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_configuration.py
@@ -15,11 +15,13 @@
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: The IP configuration name.
+ :param name: Required. The IP configuration name.
:type name: str
- :param subnet: The subnet.
+ :param subnet: Required. The subnet.
:type subnet:
~azure.mgmt.compute.v2016_04_30_preview.models.ApiEntityReference
:param application_gateway_backend_address_pools: The application gateway
@@ -50,10 +52,10 @@ class VirtualMachineScaleSetIPConfiguration(SubResource):
'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
}
- def __init__(self, name, subnet, id=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None):
- super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id)
- self.name = name
- self.subnet = subnet
- self.application_gateway_backend_address_pools = application_gateway_backend_address_pools
- self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
- self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetIPConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.subnet = kwargs.get('subnet', None)
+ self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None)
+ self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None)
+ self.load_balancer_inbound_nat_pools = kwargs.get('load_balancer_inbound_nat_pools', None)
diff --git a/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
new file mode 100644
index 000000000000..e3c09703cdf1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_ip_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 import SubResource
+
+
+class VirtualMachineScaleSetIPConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's IP configuration.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The IP configuration name.
+ :type name: str
+ :param subnet: Required. The subnet.
+ :type subnet:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ApiEntityReference
+ :param application_gateway_backend_address_pools: The application gateway
+ backend address pools.
+ :type application_gateway_backend_address_pools:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource]
+ :param load_balancer_backend_address_pools: The load balancer backend
+ address pools.
+ :type load_balancer_backend_address_pools:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource]
+ :param load_balancer_inbound_nat_pools: The load balancer inbound nat
+ pools.
+ :type load_balancer_inbound_nat_pools:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.SubResource]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'subnet': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'},
+ 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
+ }
+
+ def __init__(self, *, name: str, subnet, id: str=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.subnet = subnet
+ self.application_gateway_backend_address_pools = application_gateway_backend_address_pools
+ self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
+ self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters.py
index 04165586b8ee..d620b4bada5e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters.py
@@ -26,6 +26,6 @@ class VirtualMachineScaleSetManagedDiskParameters(Model):
'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
}
- def __init__(self, storage_account_type=None):
- super(VirtualMachineScaleSetManagedDiskParameters, self).__init__()
- self.storage_account_type = storage_account_type
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_managed_disk_parameters_py3.py
new file mode 100644
index 000000000000..0d248895d204
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.StorageAccountTypes
+ """
+
+ _attribute_map = {
+ 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
+ }
+
+ def __init__(self, *, storage_account_type=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs)
+ self.storage_account_type = storage_account_type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration.py
index 0a8ef8ef3399..7ada583e7a1f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration.py
@@ -16,13 +16,16 @@ 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: The network configuration name.
+ :param name: Required. The network configuration name.
:type name: str
:param primary: Whether this is a primary NIC on a virtual machine.
:type primary: bool
- :param ip_configurations: The virtual machine scale set IP Configuration.
+ :param ip_configurations: Required. The virtual machine scale set IP
+ Configuration.
:type ip_configurations:
list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIPConfiguration]
"""
@@ -39,8 +42,8 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource):
'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
}
- def __init__(self, name, ip_configurations, id=None, primary=None):
- super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id)
- self.name = name
- self.primary = primary
- self.ip_configurations = ip_configurations
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.primary = kwargs.get('primary', None)
+ self.ip_configurations = kwargs.get('ip_configurations', None)
diff --git a/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
new file mode 100644
index 000000000000..10a0d88b296e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_configuration_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 import SubResource
+
+
+class VirtualMachineScaleSetNetworkConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's network
+ configurations.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The network configuration name.
+ :type name: str
+ :param primary: Whether this is a primary NIC on a virtual machine.
+ :type primary: bool
+ :param ip_configurations: Required. The virtual machine scale set IP
+ Configuration.
+ :type ip_configurations:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIPConfiguration]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'ip_configurations': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'primary': {'key': 'properties.primary', 'type': 'bool'},
+ 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
+ }
+
+ def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.primary = primary
+ self.ip_configurations = ip_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile.py
index 72de79a9a0ae..db88739b701e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetNetworkProfile(Model):
'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
}
- def __init__(self, network_interface_configurations=None):
- super(VirtualMachineScaleSetNetworkProfile, self).__init__()
- self.network_interface_configurations = network_interface_configurations
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs)
+ self.network_interface_configurations = kwargs.get('network_interface_configurations', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_network_profile_py3.py
new file mode 100644
index 000000000000..ddf18bc1ce31
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_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 VirtualMachineScaleSetNetworkProfile(Model):
+ """Describes a virtual machine scale set network profile.
+
+ :param network_interface_configurations: The list of network
+ configurations.
+ :type network_interface_configurations:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkConfiguration]
+ """
+
+ _attribute_map = {
+ 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
+ }
+
+ def __init__(self, *, network_interface_configurations=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs)
+ self.network_interface_configurations = network_interface_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk.py
index 6ad683c1d03e..f7f1d53b2524 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk.py
@@ -15,6 +15,8 @@
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
@@ -23,13 +25,13 @@ class VirtualMachineScaleSetOSDisk(Model):
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or
~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
- :param create_option: 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'
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes
:param os_type: This property allows you to specify the type of the OS
@@ -64,12 +66,12 @@ class VirtualMachineScaleSetOSDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
}
- def __init__(self, create_option, name=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None):
- super(VirtualMachineScaleSetOSDisk, self).__init__()
- self.name = name
- self.caching = caching
- self.create_option = create_option
- self.os_type = os_type
- self.image = image
- self.vhd_containers = vhd_containers
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.os_type = kwargs.get('os_type', None)
+ self.image = kwargs.get('image', None)
+ self.vhd_containers = kwargs.get('vhd_containers', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_disk_py3.py
new file mode 100644
index 000000000000..48478d7fc9c9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_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 VirtualMachineScaleSetOSDisk(Model):
+ """Describes a virtual machine scale set operating system disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: The disk name.
+ :type name: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiskCreateOptionTypes
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2016_04_30_preview.models.OperatingSystemTypes
+ :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk
+ will be copied before using it to attach to the Virtual Machine. If
+ SourceImage is provided, the destination VirtualHardDisk should not exist.
+ :type image:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualHardDisk
+ :param vhd_containers: The list of virtual hard disk container uris.
+ :type vhd_containers: list[str]
+ :param managed_disk: The managed disk parameters.
+ :type managed_disk:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetManagedDiskParameters
+ """
+
+ _validation = {
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
+ }
+
+ def __init__(self, *, create_option, name: str=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = name
+ self.caching = caching
+ self.create_option = create_option
+ self.os_type = os_type
+ self.image = image
+ self.vhd_containers = vhd_containers
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile.py
index 794d373d4b03..2008a2f9bd71 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile.py
@@ -73,12 +73,12 @@ class VirtualMachineScaleSetOSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name_prefix=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(VirtualMachineScaleSetOSProfile, self).__init__()
- 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
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile_py3.py
new file mode 100644
index 000000000000..43dbcf5050f4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_os_profile_py3.py
@@ -0,0 +1,84 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetOSProfile(Model):
+ """Describes a virtual machine scale set OS profile.
+
+ :param computer_name_prefix: Specifies the computer name prefix for all of
+ the virtual machines in the scale set. Computer name prefixes must be 1 to
+ 15 characters long.
+ :type computer_name_prefix: str
+ :param admin_username: Specifies the name of the administrator account.
+
**Windows-only restriction:** Cannot end in "."
+ **Disallowed values:** "administrator", "admin", "user", "user1", "test",
+ "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm",
+ "admin2", "aspnet", "backup", "console", "david", "guest", "john",
+ "owner", "root", "server", "sql", "support", "support_388945a0", "sys",
+ "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1
+ character
**Max-length (Linux):** 64 characters
+ **Max-length (Windows):** 20 characters
For root access to
+ the Linux VM, see [Using root privileges on Linux virtual machines in
+ Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ For a list of built-in system users on Linux that should not be used in
+ this field, see [Selecting User Names for Linux on
+ Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ :type admin_username: str
+ :param admin_password: Specifies the password of the administrator
+ account.
**Minimum-length (Windows):** 8 characters
+ **Minimum-length (Linux):** 6 characters
**Max-length
+ (Windows):** 123 characters
**Max-length (Linux):** 72 characters
+
**Complexity requirements:** 3 out of 4 conditions below need to
+ be fulfilled
Has lower characters
Has upper characters
Has a
+ digit
Has a special character (Regex match [\\W_])
+ **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123",
+ "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
+ "iloveyou!"
For resetting the password, see [How to reset the
+ Remote Desktop service or its login password in a Windows
+ VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
For resetting root password, see [Manage users, SSH, and check or
+ repair disks on Azure Linux VMs using the VMAccess
+ Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
+ :type admin_password: str
+ :param custom_data: A base-64 encoded string of custom data.
+ :type custom_data: str
+ :param windows_configuration: The Windows Configuration of the OS profile.
+ :type windows_configuration:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.WindowsConfiguration
+ :param linux_configuration: The Linux Configuration of the OS profile.
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.LinuxConfiguration
+ :param secrets: The List of certificates for addition to the VM.
+ :type secrets:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs)
+ self.computer_name_prefix = computer_name_prefix
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/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
new file mode 100644
index 000000000000..f6125f581a42
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_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 import Resource
+
+
+class VirtualMachineScaleSet(Resource):
+ """Describes a Virtual Machine Scale Set.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku: The virtual machine scale set sku.
+ :type sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan
+ :param upgrade_policy: The upgrade policy.
+ :type upgrade_policy:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.UpgradePolicy
+ :param virtual_machine_profile: The virtual machine profile.
+ :type virtual_machine_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMProfile
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param over_provision: Specifies whether the Virtual Machine Scale Set
+ should be overprovisioned.
+ :type over_provision: bool
+ :param single_placement_group: When true this limits the scale set to a
+ single placement group, of max size 100 virtual machines.
+ :type single_placement_group: bool
+ :param identity: The identity of the virtual machine scale set, if
+ configured.
+ :type identity:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetIdentity
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'plan': {'key': 'plan', 'type': 'Plan'},
+ 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'},
+ 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'over_provision': {'key': 'properties.overProvision', 'type': 'bool'},
+ 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'},
+ 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
+ }
+
+ def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, over_provision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None:
+ super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs)
+ self.sku = sku
+ self.plan = plan
+ self.upgrade_policy = upgrade_policy
+ self.virtual_machine_profile = virtual_machine_profile
+ self.provisioning_state = None
+ self.over_provision = over_provision
+ self.single_placement_group = single_placement_group
+ self.identity = identity
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku.py
index 92a5f37dbb52..55dc4909fc9f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku.py
@@ -39,8 +39,8 @@ class VirtualMachineScaleSetSku(Model):
'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSku, self).__init__()
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity.py
index 59c2c5add9a2..32f1d5fcd5a9 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity.py
@@ -44,8 +44,8 @@ class VirtualMachineScaleSetSkuCapacity(Model):
'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSkuCapacity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
self.minimum = None
self.maximum = None
self.default_capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_capacity_py3.py
new file mode 100644
index 000000000000..30476ad800b0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.VirtualMachineScaleSetSkuScaleType
+ """
+
+ _validation = {
+ 'minimum': {'readonly': True},
+ 'maximum': {'readonly': True},
+ 'default_capacity': {'readonly': True},
+ 'scale_type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'minimum': {'key': 'minimum', 'type': 'long'},
+ 'maximum': {'key': 'maximum', 'type': 'long'},
+ 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'},
+ 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
+ self.minimum = None
+ self.maximum = None
+ self.default_capacity = None
+ self.scale_type = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_sku_py3.py
new file mode 100644
index 000000000000..8811dfc92e85
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.Sku
+ :ivar capacity: Specifies the number of virtual machines in the scale set.
+ :vartype capacity:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetSkuCapacity
+ """
+
+ _validation = {
+ 'resource_type': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'capacity': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSku, self).__init__(**kwargs)
+ self.resource_type = None
+ self.sku = None
+ self.capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile.py
index 14000de695dc..4cd0466e4685 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile.py
@@ -32,8 +32,8 @@ class VirtualMachineScaleSetStorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'},
}
- def __init__(self, image_reference=None, os_disk=None, data_disks=None):
- super(VirtualMachineScaleSetStorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
- self.data_disks = data_disks
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_storage_profile_py3.py
new file mode 100644
index 000000000000..c57a42c0aca6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_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 VirtualMachineScaleSetStorageProfile(Model):
+ """Describes a virtual machine scale set storage profile.
+
+ :param image_reference: The image reference.
+ :type image_reference:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.ImageReference
+ :param os_disk: The OS disk.
+ :type os_disk:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSDisk
+ :param data_disks: The data disks.
+ :type data_disks:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetDataDisk]
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm.py
index 2e832a307682..b50a65c4da56 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSetVM(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -135,20 +137,20 @@ class VirtualMachineScaleSetVM(Resource):
'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
}
- def __init__(self, location, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type=None, plan=None):
- super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags)
+ 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 = 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.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 = license_type
- self.plan = plan
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary.py
index 8c049d09944f..9f487b98ca78 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary.py
@@ -35,7 +35,7 @@ class VirtualMachineScaleSetVMExtensionsSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__()
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_extensions_summary_py3.py
new file mode 100644
index 000000000000..ad719a30e3c7
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs)
+ self.name = None
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids.py
index 681ab449f3f2..772c66dad326 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetVMInstanceIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids=None):
- super(VirtualMachineScaleSetVMInstanceIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/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/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids.py
index 2a35798001fa..ece250dd4fd4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids.py
@@ -15,7 +15,9 @@
class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
"""Specifies a list of virtual machine instance IDs from the VM scale set.
- :param instance_ids: The virtual machine scale set instance ids.
+ 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]
"""
@@ -27,6 +29,6 @@ class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids):
- super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/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/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view.py
index 8692481ee81c..641b2b535d0c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view.py
@@ -57,14 +57,14 @@ class VirtualMachineScaleSetVMInstanceView(Model):
'placement_group_id': {'key': 'placementGroupId', 'type': 'str'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id=None):
- super(VirtualMachineScaleSetVMInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.disks = disks
- self.extensions = extensions
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
- self.placement_group_id = placement_group_id
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
+ self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
+ self.statuses = kwargs.get('statuses', None)
+ self.placement_group_id = kwargs.get('placement_group_id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view_py3.py
new file mode 100644
index 000000000000..d16428111fc0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_instance_view_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 VirtualMachineScaleSetVMInstanceView(Model):
+ """The instance view of a virtual machine scale set VM.
+
+ :param platform_update_domain: The Update Domain count.
+ :type platform_update_domain: int
+ :param platform_fault_domain: The Fault Domain count.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineAgentInstanceView
+ :param disks: The disks information.
+ :type disks:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionInstanceView]
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2016_04_30_preview.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.InstanceViewStatus]
+ :param placement_group_id: The placement group in which the VM is running.
+ If the VM is deallocated it will not have a placementGroupId.
+ :type placement_group_id: str
+ """
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.disks = disks
+ self.extensions = extensions
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
+ self.placement_group_id = placement_group_id
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile.py
index a106cd87f3b4..433e67fd340a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile.py
@@ -36,9 +36,9 @@ class VirtualMachineScaleSetVMProfile(Model):
'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
}
- def __init__(self, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None):
- super(VirtualMachineScaleSetVMProfile, self).__init__()
- self.os_profile = os_profile
- self.storage_profile = storage_profile
- self.network_profile = network_profile
- self.extension_profile = extension_profile
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = kwargs.get('os_profile', None)
+ self.storage_profile = kwargs.get('storage_profile', None)
+ self.network_profile = kwargs.get('network_profile', None)
+ self.extension_profile = kwargs.get('extension_profile', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile_py3.py
new file mode 100644
index 000000000000..4ad7899f9632
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_profile_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 VirtualMachineScaleSetVMProfile(Model):
+ """Describes a virtual machine scale set virtual machine profile.
+
+ :param os_profile: The virtual machine scale set OS profile.
+ :type os_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetOSProfile
+ :param storage_profile: The virtual machine scale set storage profile.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetStorageProfile
+ :param network_profile: The virtual machine scale set network profile.
+ :type network_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetNetworkProfile
+ :param extension_profile: The virtual machine scale set extension profile.
+ :type extension_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetExtensionProfile
+ """
+
+ _attribute_map = {
+ 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'},
+ 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'},
+ 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'},
+ 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
+ }
+
+ def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, extension_profile=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = os_profile
+ self.storage_profile = storage_profile
+ self.network_profile = network_profile
+ self.extension_profile = extension_profile
diff --git a/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
new file mode 100644
index 000000000000..79793f66dac7
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_scale_set_vm_py3.py
@@ -0,0 +1,156 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class VirtualMachineScaleSetVM(Resource):
+ """Describes a virtual machine scale set virtual machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar instance_id: The virtual machine instance ID.
+ :vartype instance_id: str
+ :ivar sku: The virtual machine SKU.
+ :vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku
+ :ivar latest_model_applied: Specifies whether the latest model has been
+ applied to the virtual machine.
+ :vartype latest_model_applied: bool
+ :ivar vm_id: Azure VM unique ID.
+ :vartype vm_id: str
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineInstanceView
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2016_04_30_preview.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2016_04_30_preview.models.SubResource
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2016_04_30_preview.models.Plan
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'instance_id': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'latest_model_applied': {'readonly': True},
+ 'vm_id': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'instance_id': {'key': 'instanceId', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'},
+ 'vm_id': {'key': 'properties.vmId', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': '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/v2016_04_30_preview/models/virtual_machine_size.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size.py
index 3f4fa7f06b70..0fef3efd6c8e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size.py
@@ -43,11 +43,11 @@ class VirtualMachineSize(Model):
'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'},
}
- def __init__(self, name=None, number_of_cores=None, os_disk_size_in_mb=None, resource_disk_size_in_mb=None, memory_in_mb=None, max_data_disk_count=None):
- super(VirtualMachineSize, self).__init__()
- 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
+ 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/v2016_04_30_preview/models/virtual_machine_size_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_size_py3.py
new file mode 100644
index 000000000000..9f99ba20ce42
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/virtual_machine_status_code_count.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count.py
index 177515706064..7df7b702acd7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count.py
@@ -35,7 +35,7 @@ class VirtualMachineStatusCodeCount(Model):
'count': {'key': 'count', 'type': 'int'},
}
- def __init__(self):
- super(VirtualMachineStatusCodeCount, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineStatusCodeCount, self).__init__(**kwargs)
self.code = None
self.count = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/virtual_machine_status_code_count_py3.py
new file mode 100644
index 000000000000..c38800073a95
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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/v2016_04_30_preview/models/win_rm_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration.py
index 46700643d104..41635875026d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration.py
@@ -24,6 +24,6 @@ class WinRMConfiguration(Model):
'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
}
- def __init__(self, listeners=None):
- super(WinRMConfiguration, self).__init__()
- self.listeners = listeners
+ def __init__(self, **kwargs):
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = kwargs.get('listeners', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_configuration_py3.py
new file mode 100644
index 000000000000..ac5143326bd3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.WinRMListener]
+ """
+
+ _attribute_map = {
+ 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
+ }
+
+ def __init__(self, *, listeners=None, **kwargs) -> None:
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = listeners
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py
index 8cedce9683bb..705c7526004b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py
@@ -36,7 +36,7 @@ class WinRMListener(Model):
'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
}
- def __init__(self, protocol=None, certificate_url=None):
- super(WinRMListener, self).__init__()
- self.protocol = protocol
- self.certificate_url = certificate_url
+ 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/v2016_04_30_preview/models/win_rm_listener_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener_py3.py
new file mode 100644
index 000000000000..ab6093907ea0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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.v2016_04_30_preview.models.ProtocolTypes
+ :param certificate_url: This is the URL of a certificate that has been
+ uploaded to Key Vault as a secret. For adding a secret to the Key Vault,
+ see [Add a key or secret to the key
+ vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).
+ In this case, your certificate needs to be It is the Base64 encoding of
+ the following JSON Object which is encoded in UTF-8:
{
+ "data":"",
"dataType":"pfx",
+ "password":""
}
+ :type certificate_url: str
+ """
+
+ _attribute_map = {
+ 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'},
+ 'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None:
+ super(WinRMListener, self).__init__(**kwargs)
+ self.protocol = protocol
+ self.certificate_url = certificate_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration.py
index f4d4afd09ade..cd649be575cb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration.py
@@ -46,10 +46,10 @@ class WindowsConfiguration(Model):
'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
}
- def __init__(self, provision_vm_agent=None, enable_automatic_updates=None, time_zone=None, additional_unattend_content=None, win_rm=None):
- super(WindowsConfiguration, self).__init__()
- 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
+ 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/v2016_04_30_preview/models/windows_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration_py3.py
new file mode 100644
index 000000000000..768c300efc00
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/windows_configuration_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 WindowsConfiguration(Model):
+ """Specifies Windows operating system settings on the virtual machine.
+
+ :param provision_vm_agent: Indicates whether virtual machine agent should
+ be provisioned on the virtual machine.
When this property is not
+ specified in the request body, default behavior is to set it to true.
+ This will ensure that VM Agent is installed on the VM so that extensions
+ can be added to the VM later.
+ :type provision_vm_agent: bool
+ :param enable_automatic_updates: Indicates whether virtual machine is
+ enabled for automatic updates.
+ :type enable_automatic_updates: bool
+ :param time_zone: Specifies the time zone of the virtual machine. e.g.
+ "Pacific Standard Time"
+ :type time_zone: str
+ :param additional_unattend_content: Specifies additional base-64 encoded
+ XML formatted information that can be included in the Unattend.xml file,
+ which is used by Windows Setup.
+ :type additional_unattend_content:
+ list[~azure.mgmt.compute.v2016_04_30_preview.models.AdditionalUnattendContent]
+ :param win_rm: Specifies the Windows Remote Management listeners. This
+ enables remote Windows PowerShell.
+ :type win_rm:
+ ~azure.mgmt.compute.v2016_04_30_preview.models.WinRMConfiguration
+ """
+
+ _attribute_map = {
+ 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'},
+ 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'},
+ 'time_zone': {'key': 'timeZone', 'type': 'str'},
+ 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'},
+ 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
+ }
+
+ def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None:
+ super(WindowsConfiguration, self).__init__(**kwargs)
+ self.provision_vm_agent = provision_vm_agent
+ self.enable_automatic_updates = enable_automatic_updates
+ self.time_zone = time_zone
+ self.additional_unattend_content = additional_unattend_content
+ self.win_rm = win_rm
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/disks_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/disks_operations.py
index 84bbbd333378..1bb9532e2524 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/disks_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/disks_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates or updates a disk.
:param resource_group_name: The name of the resource group.
@@ -106,13 +106,16 @@ def create_or_update(
operation.
:type disk: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Disk or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Disk or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -123,30 +126,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Disk', response)
if raw:
@@ -155,12 +136,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'}
@@ -216,7 +198,7 @@ def _update_initial(
return deserialized
def update(
- self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config):
"""Updates (patches) a disk.
:param resource_group_name: The name of the resource group.
@@ -230,13 +212,16 @@ def update(
operation.
:type disk: ~azure.mgmt.compute.v2016_04_30_preview.models.DiskUpdate
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Disk or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Disk or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]]
:raises: :class:`CloudError`
"""
raw_result = self._update_initial(
@@ -247,30 +232,8 @@ def update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Disk', response)
if raw:
@@ -279,12 +242,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'}
def get(
@@ -399,7 +363,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Deletes a disk.
:param resource_group_name: The name of the resource group.
@@ -410,13 +374,16 @@ def delete(
length is 80 characters.
:type disk_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -426,30 +393,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -458,12 +403,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'}
def list_by_resource_group(
@@ -652,7 +598,7 @@ def _grant_access_initial(
return deserialized
def grant_access(
- self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config):
"""Grants access to a disk.
:param resource_group_name: The name of the resource group.
@@ -669,13 +615,16 @@ def grant_access(
access expires.
:type duration_in_seconds: int
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns AccessUri or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns AccessUri or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]]
:raises: :class:`CloudError`
"""
raw_result = self._grant_access_initial(
@@ -687,30 +636,8 @@ def grant_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('AccessUri', response)
if raw:
@@ -719,12 +646,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'}
@@ -774,7 +702,7 @@ def _revoke_access_initial(
return deserialized
def revoke_access(
- self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Revokes access to a disk.
:param resource_group_name: The name of the resource group.
@@ -785,13 +713,16 @@ def revoke_access(
length is 80 characters.
:type disk_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._revoke_access_initial(
@@ -801,30 +732,8 @@ def revoke_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -833,10 +742,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/images_operations.py
index 50f8d3520e47..a9f7099d9cff 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/images_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/images_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -102,13 +102,16 @@ def create_or_update(
:param parameters: Parameters supplied to the Create Image operation.
:type parameters: ~azure.mgmt.compute.v2016_04_30_preview.models.Image
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Image or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Image or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Image]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Image]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -119,30 +122,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Image', response)
if raw:
@@ -151,12 +132,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -206,7 +188,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -214,13 +196,16 @@ def delete(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -230,30 +215,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -262,12 +225,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/snapshots_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/snapshots_operations.py
index 996f908d3821..4d0356d0abed 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/snapshots_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/snapshots_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates or updates a snapshot.
:param resource_group_name: The name of the resource group.
@@ -105,13 +105,16 @@ def create_or_update(
:type snapshot:
~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Snapshot or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Snapshot or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -122,30 +125,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Snapshot', response)
if raw:
@@ -154,12 +135,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'}
@@ -215,7 +197,7 @@ def _update_initial(
return deserialized
def update(
- self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config):
"""Updates (patches) a snapshot.
:param resource_group_name: The name of the resource group.
@@ -228,13 +210,16 @@ def update(
:type snapshot:
~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotUpdate
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Snapshot or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Snapshot or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]]
:raises: :class:`CloudError`
"""
raw_result = self._update_initial(
@@ -245,30 +230,8 @@ def update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Snapshot', response)
if raw:
@@ -277,12 +240,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'}
def get(
@@ -395,7 +359,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Deletes a snapshot.
:param resource_group_name: The name of the resource group.
@@ -404,13 +368,16 @@ def delete(
subscription and resource group.
:type snapshot_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -420,30 +387,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -452,12 +397,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'}
def list_by_resource_group(
@@ -646,7 +592,7 @@ def _grant_access_initial(
return deserialized
def grant_access(
- self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config):
"""Grants access to a snapshot.
:param resource_group_name: The name of the resource group.
@@ -661,13 +607,16 @@ def grant_access(
access expires.
:type duration_in_seconds: int
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns AccessUri or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns AccessUri or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]]
:raises: :class:`CloudError`
"""
raw_result = self._grant_access_initial(
@@ -679,30 +628,8 @@ def grant_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('AccessUri', response)
if raw:
@@ -711,12 +638,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'}
@@ -766,7 +694,7 @@ def _revoke_access_initial(
return deserialized
def revoke_access(
- self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Revokes access to a snapshot.
:param resource_group_name: The name of the resource group.
@@ -775,13 +703,16 @@ def revoke_access(
subscription and resource group.
:type snapshot_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._revoke_access_initial(
@@ -791,30 +722,8 @@ def revoke_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -823,10 +732,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extensions_operations.py
index b892d8a98194..69098285f870 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extensions_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_extensions_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -93,7 +93,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -108,13 +108,16 @@ def create_or_update(
:type extension_parameters:
~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineExtension or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachineExtension
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -126,30 +129,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineExtension', response)
if raw:
@@ -158,12 +139,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -214,7 +196,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +207,16 @@ def delete(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -242,30 +227,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -274,12 +237,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_set_vms_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_set_vms_operations.py
index 547cf2714cc8..61b70093702b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_set_vms_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_set_vms_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -87,7 +87,7 @@ def _reimage_initial(
return deserialized
def reimage(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -98,13 +98,16 @@ def reimage(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_initial(
@@ -115,30 +118,8 @@ def reimage(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -147,12 +128,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -203,7 +185,7 @@ def _reimage_all_initial(
return deserialized
def reimage_all(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -215,13 +197,16 @@ def reimage_all(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_all_initial(
@@ -232,30 +217,8 @@ def reimage_all(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -264,12 +227,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -320,7 +284,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -333,13 +297,16 @@ def deallocate(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -350,30 +317,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -382,12 +327,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -438,7 +384,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -448,13 +394,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -465,30 +414,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -497,12 +424,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -769,7 +697,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -782,13 +710,16 @@ def power_off(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -799,30 +730,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -831,12 +740,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -887,7 +797,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -897,13 +807,16 @@ def restart(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -914,30 +827,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -946,12 +837,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1002,7 +894,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1012,13 +904,16 @@ def start(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -1029,30 +924,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1061,10 +934,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_sets_operations.py
index 2c83051debd4..32b27d043583 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_sets_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machine_scale_sets_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Create or update a VM scale set.
:param resource_group_name: The name of the resource group.
@@ -103,13 +103,16 @@ def create_or_update(
:type parameters:
~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineScaleSet or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachineScaleSet
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -120,30 +123,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineScaleSet', response)
if raw:
@@ -152,12 +133,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -207,7 +189,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -215,13 +197,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -231,30 +216,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -263,12 +226,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -392,7 +356,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -408,13 +372,16 @@ def deallocate(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -425,30 +392,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -457,12 +402,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -518,7 +464,7 @@ def _delete_instances_initial(
return deserialized
def delete_instances(
- self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -528,13 +474,16 @@ def delete_instances(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_instances_initial(
@@ -545,30 +494,8 @@ def delete_instances(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -577,12 +504,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -915,7 +843,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -931,13 +859,16 @@ def power_off(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -948,30 +879,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -980,12 +889,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1046,7 +956,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1059,13 +969,16 @@ def restart(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -1076,30 +989,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1108,12 +999,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1174,7 +1066,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1187,13 +1079,16 @@ def start(
machine scale set.
:type instance_ids: list[str]
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -1204,30 +1099,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1236,12 +1109,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1297,7 +1171,7 @@ def _update_instances_initial(
return deserialized
def update_instances(
- self, resource_group_name, vm_scale_set_name, instance_ids, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1308,13 +1182,16 @@ def update_instances(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._update_instances_initial(
@@ -1325,30 +1202,8 @@ def update_instances(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1357,12 +1212,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1412,7 +1268,7 @@ def _reimage_initial(
return deserialized
def reimage(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Reimages (upgrade the operating system) one or more virtual machines in
a VM scale set.
@@ -1421,13 +1277,16 @@ def reimage(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_initial(
@@ -1437,30 +1296,8 @@ def reimage(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1469,12 +1306,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1524,7 +1362,7 @@ def _reimage_all_initial(
return deserialized
def reimage_all(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Reimages all the disks ( including data disks ) in the virtual machines
in a VM scale set. This operation is only supported for managed disks.
@@ -1533,13 +1371,16 @@ def reimage_all(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_all_initial(
@@ -1549,30 +1390,8 @@ def reimage_all(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1581,10 +1400,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
reimage_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py
index 0c34d8b675b7..6abfbaf986c2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -90,7 +90,7 @@ def _capture_initial(
return deserialized
def capture(
- self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -103,13 +103,17 @@ def capture(
:type parameters:
~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureParameters
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineCaptureResult or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns
+ VirtualMachineCaptureResult or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureResult]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureResult]]
:raises: :class:`CloudError`
"""
raw_result = self._capture_initial(
@@ -120,30 +124,8 @@ def capture(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineCaptureResult', response)
if raw:
@@ -152,12 +134,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -213,7 +196,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +208,16 @@ def create_or_update(
:type parameters:
~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachine or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachine or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -242,30 +228,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachine', response)
if raw:
@@ -274,12 +238,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -329,7 +294,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -337,13 +302,16 @@ def delete(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -353,30 +321,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -385,12 +331,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -509,7 +456,7 @@ def _convert_to_managed_disks_initial(
return deserialized
def convert_to_managed_disks(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -519,13 +466,16 @@ def convert_to_managed_disks(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._convert_to_managed_disks_initial(
@@ -535,30 +485,8 @@ def convert_to_managed_disks(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -567,12 +495,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -622,7 +551,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -632,13 +561,16 @@ def deallocate(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._deallocate_initial(
@@ -648,30 +580,8 @@ def deallocate(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -680,12 +590,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
@@ -1007,7 +918,7 @@ def _power_off_initial(
return deserialized
def power_off(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1017,13 +928,16 @@ def power_off(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._power_off_initial(
@@ -1033,30 +947,8 @@ def power_off(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1065,12 +957,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1120,7 +1013,7 @@ def _restart_initial(
return deserialized
def restart(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1128,13 +1021,16 @@ def restart(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._restart_initial(
@@ -1144,30 +1040,8 @@ def restart(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1176,12 +1050,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1231,7 +1106,7 @@ def _start_initial(
return deserialized
def start(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1239,13 +1114,16 @@ def start(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_initial(
@@ -1255,30 +1133,8 @@ def start(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1287,12 +1143,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -1342,7 +1199,7 @@ def _redeploy_initial(
return deserialized
def redeploy(
- self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -1350,13 +1207,16 @@ def redeploy(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._redeploy_initial(
@@ -1366,30 +1226,8 @@ def redeploy(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -1398,10 +1236,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py
index 966e2439cd7e..0fd5d783f72f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py
@@ -9,135 +9,266 @@
# regenerated.
# --------------------------------------------------------------------------
-from .instance_view_status import InstanceViewStatus
-from .sub_resource import SubResource
-from .sku import Sku
-from .availability_set import AvailabilitySet
-from .virtual_machine_size import VirtualMachineSize
-from .virtual_machine_extension_image import VirtualMachineExtensionImage
-from .virtual_machine_image_resource import VirtualMachineImageResource
-from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
-from .virtual_machine_extension import VirtualMachineExtension
-from .purchase_plan import PurchasePlan
-from .os_disk_image import OSDiskImage
-from .data_disk_image import DataDiskImage
-from .virtual_machine_image import VirtualMachineImage
-from .usage_name import UsageName
-from .usage import Usage
-from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
-from .virtual_machine_capture_result import VirtualMachineCaptureResult
-from .plan import Plan
-from .hardware_profile import HardwareProfile
-from .image_reference import ImageReference
-from .key_vault_secret_reference import KeyVaultSecretReference
-from .key_vault_key_reference import KeyVaultKeyReference
-from .disk_encryption_settings import DiskEncryptionSettings
-from .virtual_hard_disk import VirtualHardDisk
-from .managed_disk_parameters import ManagedDiskParameters
-from .os_disk import OSDisk
-from .data_disk import DataDisk
-from .storage_profile import StorageProfile
-from .additional_unattend_content import AdditionalUnattendContent
-from .win_rm_listener import WinRMListener
-from .win_rm_configuration import WinRMConfiguration
-from .windows_configuration import WindowsConfiguration
-from .ssh_public_key import SshPublicKey
-from .ssh_configuration import SshConfiguration
-from .linux_configuration import LinuxConfiguration
-from .vault_certificate import VaultCertificate
-from .vault_secret_group import VaultSecretGroup
-from .os_profile import OSProfile
-from .network_interface_reference import NetworkInterfaceReference
-from .network_profile import NetworkProfile
-from .boot_diagnostics import BootDiagnostics
-from .diagnostics_profile import DiagnosticsProfile
-from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
-from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
-from .disk_instance_view import DiskInstanceView
-from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
-from .virtual_machine_identity import VirtualMachineIdentity
-from .maintenance_redeploy_status import MaintenanceRedeployStatus
-from .virtual_machine_instance_view import VirtualMachineInstanceView
-from .virtual_machine import VirtualMachine
-from .rolling_upgrade_policy import RollingUpgradePolicy
-from .upgrade_policy import UpgradePolicy
-from .image_os_disk import ImageOSDisk
-from .image_data_disk import ImageDataDisk
-from .image_storage_profile import ImageStorageProfile
-from .image import Image
-from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity
-from .resource_sku_capacity import ResourceSkuCapacity
-from .resource_sku_costs import ResourceSkuCosts
-from .resource_sku_capabilities import ResourceSkuCapabilities
-from .resource_sku_restrictions import ResourceSkuRestrictions
-from .resource_sku import ResourceSku
-from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
-from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile
-from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters
-from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
-from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk
-from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk
-from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
-from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile
-from .api_entity_reference import ApiEntityReference
-from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings
-from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration
-from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration
-from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
-from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration
-from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings
-from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
-from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration
-from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
-from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile
-from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
-from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
-from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
-from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile
-from .virtual_machine_scale_set import VirtualMachineScaleSet
-from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate
-from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
-from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
-from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
-from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
-from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
-from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
-from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
-from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
-from .virtual_machine_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_progress_info import RollingUpgradeProgressInfo
-from .api_error_base import ApiErrorBase
-from .inner_error import InnerError
-from .api_error import ApiError
-from .rolling_upgrade_status_info import RollingUpgradeStatusInfo
-from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
-from .resource import Resource
-from .update_resource import UpdateResource
-from .sub_resource_read_only import SubResourceReadOnly
-from .operation_status_response import OperationStatusResponse
-from .disk_sku import DiskSku
-from .resource_update import ResourceUpdate
-from .image_disk_reference import ImageDiskReference
-from .creation_data import CreationData
-from .source_vault import SourceVault
-from .key_vault_and_secret_reference import KeyVaultAndSecretReference
-from .key_vault_and_key_reference import KeyVaultAndKeyReference
-from .encryption_settings import EncryptionSettings
-from .disk import Disk
-from .disk_update import DiskUpdate
-from .grant_access_data import GrantAccessData
-from .access_uri import AccessUri
-from .snapshot import Snapshot
-from .snapshot_update import SnapshotUpdate
-from .run_command_input_parameter import RunCommandInputParameter
-from .run_command_input import RunCommandInput
-from .run_command_parameter_definition import RunCommandParameterDefinition
-from .run_command_document_base import RunCommandDocumentBase
-from .run_command_document import RunCommandDocument
-from .run_command_result import RunCommandResult
+try:
+ from .instance_view_status_py3 import InstanceViewStatus
+ from .sub_resource_py3 import SubResource
+ from .sku_py3 import Sku
+ from .availability_set_py3 import AvailabilitySet
+ from .virtual_machine_size_py3 import VirtualMachineSize
+ from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource_py3 import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view_py3 import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension_py3 import VirtualMachineExtension
+ from .purchase_plan_py3 import PurchasePlan
+ from .os_disk_image_py3 import OSDiskImage
+ from .data_disk_image_py3 import DataDiskImage
+ from .virtual_machine_image_py3 import VirtualMachineImage
+ from .usage_name_py3 import UsageName
+ from .usage_py3 import Usage
+ from .virtual_machine_capture_parameters_py3 import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result_py3 import VirtualMachineCaptureResult
+ from .plan_py3 import Plan
+ from .hardware_profile_py3 import HardwareProfile
+ from .image_reference_py3 import ImageReference
+ from .key_vault_secret_reference_py3 import KeyVaultSecretReference
+ from .key_vault_key_reference_py3 import KeyVaultKeyReference
+ from .disk_encryption_settings_py3 import DiskEncryptionSettings
+ from .virtual_hard_disk_py3 import VirtualHardDisk
+ from .managed_disk_parameters_py3 import ManagedDiskParameters
+ from .os_disk_py3 import OSDisk
+ from .data_disk_py3 import DataDisk
+ from .storage_profile_py3 import StorageProfile
+ from .additional_unattend_content_py3 import AdditionalUnattendContent
+ from .win_rm_listener_py3 import WinRMListener
+ from .win_rm_configuration_py3 import WinRMConfiguration
+ from .windows_configuration_py3 import WindowsConfiguration
+ from .ssh_public_key_py3 import SshPublicKey
+ from .ssh_configuration_py3 import SshConfiguration
+ from .linux_configuration_py3 import LinuxConfiguration
+ from .vault_certificate_py3 import VaultCertificate
+ from .vault_secret_group_py3 import VaultSecretGroup
+ from .os_profile_py3 import OSProfile
+ from .network_interface_reference_py3 import NetworkInterfaceReference
+ from .network_profile_py3 import NetworkProfile
+ from .boot_diagnostics_py3 import BootDiagnostics
+ from .diagnostics_profile_py3 import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view_py3 import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view_py3 import VirtualMachineAgentInstanceView
+ from .disk_instance_view_py3 import DiskInstanceView
+ from .boot_diagnostics_instance_view_py3 import BootDiagnosticsInstanceView
+ from .virtual_machine_identity_py3 import VirtualMachineIdentity
+ from .maintenance_redeploy_status_py3 import MaintenanceRedeployStatus
+ from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView
+ from .virtual_machine_py3 import VirtualMachine
+ from .rolling_upgrade_policy_py3 import RollingUpgradePolicy
+ from .upgrade_policy_py3 import UpgradePolicy
+ from .image_os_disk_py3 import ImageOSDisk
+ from .image_data_disk_py3 import ImageDataDisk
+ from .image_storage_profile_py3 import ImageStorageProfile
+ from .image_py3 import Image
+ from .virtual_machine_scale_set_identity_py3 import VirtualMachineScaleSetIdentity
+ from .resource_sku_capacity_py3 import ResourceSkuCapacity
+ from .resource_sku_costs_py3 import ResourceSkuCosts
+ from .resource_sku_capabilities_py3 import ResourceSkuCapabilities
+ from .resource_sku_restrictions_py3 import ResourceSkuRestrictions
+ from .resource_sku_py3 import ResourceSku
+ from .virtual_machine_scale_set_os_profile_py3 import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_update_os_profile_py3 import VirtualMachineScaleSetUpdateOSProfile
+ from .virtual_machine_scale_set_managed_disk_parameters_py3 import VirtualMachineScaleSetManagedDiskParameters
+ from .virtual_machine_scale_set_os_disk_py3 import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_update_os_disk_py3 import VirtualMachineScaleSetUpdateOSDisk
+ from .virtual_machine_scale_set_data_disk_py3 import VirtualMachineScaleSetDataDisk
+ from .virtual_machine_scale_set_storage_profile_py3 import VirtualMachineScaleSetStorageProfile
+ from .virtual_machine_scale_set_update_storage_profile_py3 import VirtualMachineScaleSetUpdateStorageProfile
+ from .api_entity_reference_py3 import ApiEntityReference
+ from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings
+ from .virtual_machine_scale_set_public_ip_address_configuration_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration
+ from .virtual_machine_scale_set_update_public_ip_address_configuration_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration
+ from .virtual_machine_scale_set_ip_configuration_py3 import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_update_ip_configuration_py3 import VirtualMachineScaleSetUpdateIPConfiguration
+ from .virtual_machine_scale_set_network_configuration_dns_settings_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings
+ from .virtual_machine_scale_set_network_configuration_py3 import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_update_network_configuration_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile_py3 import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_update_network_profile_py3 import VirtualMachineScaleSetUpdateNetworkProfile
+ from .virtual_machine_scale_set_extension_py3 import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile_py3 import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile_py3 import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set_update_vm_profile_py3 import VirtualMachineScaleSetUpdateVMProfile
+ from .virtual_machine_scale_set_py3 import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_update_py3 import VirtualMachineScaleSetUpdate
+ from .virtual_machine_scale_set_vm_instance_ids_py3 import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count_py3 import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary_py3 import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view_py3 import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity_py3 import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku_py3 import VirtualMachineScaleSetSku
+ from .virtual_machine_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_progress_info_py3 import RollingUpgradeProgressInfo
+ from .api_error_base_py3 import ApiErrorBase
+ from .inner_error_py3 import InnerError
+ from .api_error_py3 import ApiError
+ from .rolling_upgrade_status_info_py3 import RollingUpgradeStatusInfo
+ from .compute_long_running_operation_properties_py3 import ComputeLongRunningOperationProperties
+ from .resource_py3 import Resource
+ from .update_resource_py3 import UpdateResource
+ from .sub_resource_read_only_py3 import SubResourceReadOnly
+ from .operation_status_response_py3 import OperationStatusResponse
+ from .disk_sku_py3 import DiskSku
+ from .resource_update_py3 import ResourceUpdate
+ from .image_disk_reference_py3 import ImageDiskReference
+ from .creation_data_py3 import CreationData
+ from .source_vault_py3 import SourceVault
+ from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference
+ from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference
+ from .encryption_settings_py3 import EncryptionSettings
+ from .disk_py3 import Disk
+ from .disk_update_py3 import DiskUpdate
+ from .grant_access_data_py3 import GrantAccessData
+ from .access_uri_py3 import AccessUri
+ from .snapshot_py3 import Snapshot
+ from .snapshot_update_py3 import SnapshotUpdate
+ from .run_command_input_parameter_py3 import RunCommandInputParameter
+ from .run_command_input_py3 import RunCommandInput
+ from .run_command_parameter_definition_py3 import RunCommandParameterDefinition
+ from .run_command_document_base_py3 import RunCommandDocumentBase
+ from .run_command_document_py3 import RunCommandDocument
+ from .run_command_result_py3 import RunCommandResult
+except (SyntaxError, ImportError):
+ from .instance_view_status import InstanceViewStatus
+ from .sub_resource import SubResource
+ from .sku import Sku
+ from .availability_set import AvailabilitySet
+ from .virtual_machine_size import VirtualMachineSize
+ from .virtual_machine_extension_image import VirtualMachineExtensionImage
+ from .virtual_machine_image_resource import VirtualMachineImageResource
+ from .virtual_machine_extension_instance_view import VirtualMachineExtensionInstanceView
+ from .virtual_machine_extension import VirtualMachineExtension
+ from .purchase_plan import PurchasePlan
+ from .os_disk_image import OSDiskImage
+ from .data_disk_image import DataDiskImage
+ from .virtual_machine_image import VirtualMachineImage
+ from .usage_name import UsageName
+ from .usage import Usage
+ from .virtual_machine_capture_parameters import VirtualMachineCaptureParameters
+ from .virtual_machine_capture_result import VirtualMachineCaptureResult
+ from .plan import Plan
+ from .hardware_profile import HardwareProfile
+ from .image_reference import ImageReference
+ from .key_vault_secret_reference import KeyVaultSecretReference
+ from .key_vault_key_reference import KeyVaultKeyReference
+ from .disk_encryption_settings import DiskEncryptionSettings
+ from .virtual_hard_disk import VirtualHardDisk
+ from .managed_disk_parameters import ManagedDiskParameters
+ from .os_disk import OSDisk
+ from .data_disk import DataDisk
+ from .storage_profile import StorageProfile
+ from .additional_unattend_content import AdditionalUnattendContent
+ from .win_rm_listener import WinRMListener
+ from .win_rm_configuration import WinRMConfiguration
+ from .windows_configuration import WindowsConfiguration
+ from .ssh_public_key import SshPublicKey
+ from .ssh_configuration import SshConfiguration
+ from .linux_configuration import LinuxConfiguration
+ from .vault_certificate import VaultCertificate
+ from .vault_secret_group import VaultSecretGroup
+ from .os_profile import OSProfile
+ from .network_interface_reference import NetworkInterfaceReference
+ from .network_profile import NetworkProfile
+ from .boot_diagnostics import BootDiagnostics
+ from .diagnostics_profile import DiagnosticsProfile
+ from .virtual_machine_extension_handler_instance_view import VirtualMachineExtensionHandlerInstanceView
+ from .virtual_machine_agent_instance_view import VirtualMachineAgentInstanceView
+ from .disk_instance_view import DiskInstanceView
+ from .boot_diagnostics_instance_view import BootDiagnosticsInstanceView
+ from .virtual_machine_identity import VirtualMachineIdentity
+ from .maintenance_redeploy_status import MaintenanceRedeployStatus
+ from .virtual_machine_instance_view import VirtualMachineInstanceView
+ from .virtual_machine import VirtualMachine
+ from .rolling_upgrade_policy import RollingUpgradePolicy
+ from .upgrade_policy import UpgradePolicy
+ from .image_os_disk import ImageOSDisk
+ from .image_data_disk import ImageDataDisk
+ from .image_storage_profile import ImageStorageProfile
+ from .image import Image
+ from .virtual_machine_scale_set_identity import VirtualMachineScaleSetIdentity
+ from .resource_sku_capacity import ResourceSkuCapacity
+ from .resource_sku_costs import ResourceSkuCosts
+ from .resource_sku_capabilities import ResourceSkuCapabilities
+ from .resource_sku_restrictions import ResourceSkuRestrictions
+ from .resource_sku import ResourceSku
+ from .virtual_machine_scale_set_os_profile import VirtualMachineScaleSetOSProfile
+ from .virtual_machine_scale_set_update_os_profile import VirtualMachineScaleSetUpdateOSProfile
+ from .virtual_machine_scale_set_managed_disk_parameters import VirtualMachineScaleSetManagedDiskParameters
+ from .virtual_machine_scale_set_os_disk import VirtualMachineScaleSetOSDisk
+ from .virtual_machine_scale_set_update_os_disk import VirtualMachineScaleSetUpdateOSDisk
+ from .virtual_machine_scale_set_data_disk import VirtualMachineScaleSetDataDisk
+ from .virtual_machine_scale_set_storage_profile import VirtualMachineScaleSetStorageProfile
+ from .virtual_machine_scale_set_update_storage_profile import VirtualMachineScaleSetUpdateStorageProfile
+ from .api_entity_reference import ApiEntityReference
+ from .virtual_machine_scale_set_public_ip_address_configuration_dns_settings import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings
+ from .virtual_machine_scale_set_public_ip_address_configuration import VirtualMachineScaleSetPublicIPAddressConfiguration
+ from .virtual_machine_scale_set_update_public_ip_address_configuration import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration
+ from .virtual_machine_scale_set_ip_configuration import VirtualMachineScaleSetIPConfiguration
+ from .virtual_machine_scale_set_update_ip_configuration import VirtualMachineScaleSetUpdateIPConfiguration
+ from .virtual_machine_scale_set_network_configuration_dns_settings import VirtualMachineScaleSetNetworkConfigurationDnsSettings
+ from .virtual_machine_scale_set_network_configuration import VirtualMachineScaleSetNetworkConfiguration
+ from .virtual_machine_scale_set_update_network_configuration import VirtualMachineScaleSetUpdateNetworkConfiguration
+ from .virtual_machine_scale_set_network_profile import VirtualMachineScaleSetNetworkProfile
+ from .virtual_machine_scale_set_update_network_profile import VirtualMachineScaleSetUpdateNetworkProfile
+ from .virtual_machine_scale_set_extension import VirtualMachineScaleSetExtension
+ from .virtual_machine_scale_set_extension_profile import VirtualMachineScaleSetExtensionProfile
+ from .virtual_machine_scale_set_vm_profile import VirtualMachineScaleSetVMProfile
+ from .virtual_machine_scale_set_update_vm_profile import VirtualMachineScaleSetUpdateVMProfile
+ from .virtual_machine_scale_set import VirtualMachineScaleSet
+ from .virtual_machine_scale_set_update import VirtualMachineScaleSetUpdate
+ from .virtual_machine_scale_set_vm_instance_ids import VirtualMachineScaleSetVMInstanceIDs
+ from .virtual_machine_scale_set_vm_instance_required_ids import VirtualMachineScaleSetVMInstanceRequiredIDs
+ from .virtual_machine_status_code_count import VirtualMachineStatusCodeCount
+ from .virtual_machine_scale_set_instance_view_statuses_summary import VirtualMachineScaleSetInstanceViewStatusesSummary
+ from .virtual_machine_scale_set_vm_extensions_summary import VirtualMachineScaleSetVMExtensionsSummary
+ from .virtual_machine_scale_set_instance_view import VirtualMachineScaleSetInstanceView
+ from .virtual_machine_scale_set_sku_capacity import VirtualMachineScaleSetSkuCapacity
+ from .virtual_machine_scale_set_sku import VirtualMachineScaleSetSku
+ from .virtual_machine_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_progress_info import RollingUpgradeProgressInfo
+ from .api_error_base import ApiErrorBase
+ from .inner_error import InnerError
+ from .api_error import ApiError
+ from .rolling_upgrade_status_info import RollingUpgradeStatusInfo
+ from .compute_long_running_operation_properties import ComputeLongRunningOperationProperties
+ from .resource import Resource
+ from .update_resource import UpdateResource
+ from .sub_resource_read_only import SubResourceReadOnly
+ from .operation_status_response import OperationStatusResponse
+ from .disk_sku import DiskSku
+ from .resource_update import ResourceUpdate
+ from .image_disk_reference import ImageDiskReference
+ from .creation_data import CreationData
+ from .source_vault import SourceVault
+ from .key_vault_and_secret_reference import KeyVaultAndSecretReference
+ from .key_vault_and_key_reference import KeyVaultAndKeyReference
+ from .encryption_settings import EncryptionSettings
+ from .disk import Disk
+ from .disk_update import DiskUpdate
+ from .grant_access_data import GrantAccessData
+ from .access_uri import AccessUri
+ from .snapshot import Snapshot
+ from .snapshot_update import SnapshotUpdate
+ from .run_command_input_parameter import RunCommandInputParameter
+ from .run_command_input import RunCommandInput
+ from .run_command_parameter_definition import RunCommandParameterDefinition
+ from .run_command_document_base import RunCommandDocumentBase
+ from .run_command_document import RunCommandDocument
+ from .run_command_result import RunCommandResult
from .availability_set_paged import AvailabilitySetPaged
from .virtual_machine_size_paged import VirtualMachineSizePaged
from .usage_paged import UsagePaged
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri.py
index 09f8982bc3a7..9ee6b01de1e1 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri.py
@@ -30,6 +30,6 @@ class AccessUri(Model):
'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'},
}
- def __init__(self):
- super(AccessUri, self).__init__()
+ def __init__(self, **kwargs):
+ super(AccessUri, self).__init__(**kwargs)
self.access_sas = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri_py3.py
new file mode 100644
index 000000000000..bb9e56aa4221
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/access_uri_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 AccessUri(Model):
+ """A disk access SAS uri.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar access_sas: A SAS uri for accessing a disk.
+ :vartype access_sas: str
+ """
+
+ _validation = {
+ 'access_sas': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(AccessUri, self).__init__(**kwargs)
+ self.access_sas = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content.py
index 315b6b3e6065..2b3534860c21 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content.py
@@ -44,9 +44,9 @@ class AdditionalUnattendContent(Model):
'content': {'key': 'content', 'type': 'str'},
}
- def __init__(self, pass_name=None, component_name=None, setting_name=None, content=None):
- super(AdditionalUnattendContent, self).__init__()
- self.pass_name = pass_name
- self.component_name = component_name
- self.setting_name = setting_name
- self.content = content
+ 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/v2017_03_30/models/additional_unattend_content_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/additional_unattend_content_py3.py
new file mode 100644
index 000000000000..535b90b099a8
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.PassNames
+ :param component_name: The component name. Currently, the only allowable
+ value is Microsoft-Windows-Shell-Setup. Possible values include:
+ 'Microsoft-Windows-Shell-Setup'
+ :type component_name: str or
+ ~azure.mgmt.compute.v2017_03_30.models.ComponentNames
+ :param setting_name: Specifies the name of the setting to which the
+ content applies. Possible values are: FirstLogonCommands and AutoLogon.
+ Possible values include: 'AutoLogon', 'FirstLogonCommands'
+ :type setting_name: str or
+ ~azure.mgmt.compute.v2017_03_30.models.SettingNames
+ :param content: Specifies the XML formatted content that is added to the
+ unattend.xml file for the specified path and component. The XML must be
+ less than 4KB and must include the root element for the setting or feature
+ that is being inserted.
+ :type content: str
+ """
+
+ _attribute_map = {
+ 'pass_name': {'key': 'passName', 'type': 'PassNames'},
+ 'component_name': {'key': 'componentName', 'type': 'ComponentNames'},
+ 'setting_name': {'key': 'settingName', 'type': 'SettingNames'},
+ 'content': {'key': 'content', 'type': 'str'},
+ }
+
+ def __init__(self, *, pass_name=None, component_name=None, setting_name=None, content: str=None, **kwargs) -> None:
+ super(AdditionalUnattendContent, self).__init__(**kwargs)
+ self.pass_name = pass_name
+ self.component_name = component_name
+ self.setting_name = setting_name
+ self.content = content
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference.py
index 27696aacc3dc..d1bf572e916d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference.py
@@ -24,6 +24,6 @@ class ApiEntityReference(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(ApiEntityReference, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(ApiEntityReference, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_entity_reference_py3.py
new file mode 100644
index 000000000000..da3e07082381
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/api_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error.py
index bde43bd842fc..c20d52eb593f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error.py
@@ -35,10 +35,10 @@ class ApiError(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, details=None, innererror=None, code=None, target=None, message=None):
- super(ApiError, self).__init__()
- self.details = details
- self.innererror = innererror
- self.code = code
- self.target = target
- self.message = message
+ 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/v2017_03_30/models/api_error_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base.py
index 2fb33a0ff411..655c08638905 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base.py
@@ -29,8 +29,8 @@ class ApiErrorBase(Model):
'message': {'key': 'message', 'type': 'str'},
}
- def __init__(self, code=None, target=None, message=None):
- super(ApiErrorBase, self).__init__()
- self.code = code
- self.target = target
- self.message = message
+ 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/v2017_03_30/models/api_error_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_base_py3.py
new file mode 100644
index 000000000000..5ba95aa0283e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/api_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/api_error_py3.py
new file mode 100644
index 000000000000..22fb43607568
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.ApiErrorBase]
+ :param innererror: The Api inner error
+ :type innererror: ~azure.mgmt.compute.v2017_03_30.models.InnerError
+ :param code: The error code.
+ :type code: str
+ :param target: The target of the particular error.
+ :type target: str
+ :param message: The error message.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'details': {'key': 'details', 'type': '[ApiErrorBase]'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ 'code': {'key': 'code', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, *, details=None, innererror=None, code: str=None, target: str=None, message: str=None, **kwargs) -> None:
+ super(ApiError, self).__init__(**kwargs)
+ self.details = details
+ self.innererror = innererror
+ self.code = code
+ self.target = target
+ self.message = message
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set.py
index e0b783ab4446..ccb42b1f6601 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/availability_set.py
@@ -28,13 +28,15 @@ class AvailabilitySet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -74,10 +76,10 @@ class AvailabilitySet(Resource):
'sku': {'key': 'sku', 'type': 'Sku'},
}
- def __init__(self, location, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None, sku=None):
- super(AvailabilitySet, self).__init__(location=location, tags=tags)
- self.platform_update_domain_count = platform_update_domain_count
- self.platform_fault_domain_count = platform_fault_domain_count
- self.virtual_machines = virtual_machines
+ 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 = sku
+ self.sku = kwargs.get('sku', None)
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
new file mode 100644
index 000000000000..a096e28adcdc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 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.v2017_03_30.models.SubResource]
+ :ivar statuses: The resource status information.
+ :vartype statuses:
+ list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus]
+ :param sku: Sku of the availability set
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'statuses': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
+ 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
+ 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
+ 'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ }
+
+ def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None:
+ super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs)
+ self.platform_update_domain_count = platform_update_domain_count
+ self.platform_fault_domain_count = platform_fault_domain_count
+ self.virtual_machines = virtual_machines
+ self.statuses = None
+ self.sku = sku
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics.py
index c94d188e3fba..ca3dbdd4f23c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics.py
@@ -32,7 +32,7 @@ class BootDiagnostics(Model):
'storage_uri': {'key': 'storageUri', 'type': 'str'},
}
- def __init__(self, enabled=None, storage_uri=None):
- super(BootDiagnostics, self).__init__()
- self.enabled = enabled
- self.storage_uri = storage_uri
+ 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/v2017_03_30/models/boot_diagnostics_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view.py
index 4ec7b385558d..6fe1f84a3910 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view.py
@@ -26,7 +26,7 @@ class BootDiagnosticsInstanceView(Model):
'serial_console_log_blob_uri': {'key': 'serialConsoleLogBlobUri', 'type': 'str'},
}
- def __init__(self, console_screenshot_blob_uri=None, serial_console_log_blob_uri=None):
- super(BootDiagnosticsInstanceView, self).__init__()
- self.console_screenshot_blob_uri = console_screenshot_blob_uri
- self.serial_console_log_blob_uri = serial_console_log_blob_uri
+ 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/v2017_03_30/models/boot_diagnostics_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_instance_view_py3.py
new file mode 100644
index 000000000000..d85b51981ab9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/boot_diagnostics_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/boot_diagnostics_py3.py
new file mode 100644
index 000000000000..b0a756ea4fa0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/compute_long_running_operation_properties.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties.py
index f8ca23e0ccdf..66ff353eb206 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties.py
@@ -23,6 +23,6 @@ class ComputeLongRunningOperationProperties(Model):
'output': {'key': 'output', 'type': 'object'},
}
- def __init__(self, output=None):
- super(ComputeLongRunningOperationProperties, self).__init__()
- self.output = output
+ def __init__(self, **kwargs):
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties_py3.py
new file mode 100644
index 000000000000..a4ffd6c8c32f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_long_running_operation_properties_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 ComputeLongRunningOperationProperties(Model):
+ """Compute-specific operation properties, including output.
+
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'output': {'key': 'output', 'type': 'object'},
+ }
+
+ def __init__(self, *, output=None, **kwargs) -> None:
+ super(ComputeLongRunningOperationProperties, self).__init__(**kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_management_client_enums.py
index 9cc93642bb85..4e6dbe530093 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_management_client_enums.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/compute_management_client_enums.py
@@ -12,20 +12,20 @@
from enum import Enum
-class StatusLevelTypes(Enum):
+class StatusLevelTypes(str, Enum):
info = "Info"
warning = "Warning"
error = "Error"
-class OperatingSystemTypes(Enum):
+class OperatingSystemTypes(str, Enum):
windows = "Windows"
linux = "Linux"
-class VirtualMachineSizeTypes(Enum):
+class VirtualMachineSizeTypes(str, Enum):
basic_a0 = "Basic_A0"
basic_a1 = "Basic_A1"
@@ -126,54 +126,54 @@ class VirtualMachineSizeTypes(Enum):
standard_nv24 = "Standard_NV24"
-class CachingTypes(Enum):
+class CachingTypes(str, Enum):
none = "None"
read_only = "ReadOnly"
read_write = "ReadWrite"
-class DiskCreateOptionTypes(Enum):
+class DiskCreateOptionTypes(str, Enum):
from_image = "FromImage"
empty = "Empty"
attach = "Attach"
-class StorageAccountTypes(Enum):
+class StorageAccountTypes(str, Enum):
standard_lrs = "Standard_LRS"
premium_lrs = "Premium_LRS"
-class PassNames(Enum):
+class PassNames(str, Enum):
oobe_system = "OobeSystem"
-class ComponentNames(Enum):
+class ComponentNames(str, Enum):
microsoft_windows_shell_setup = "Microsoft-Windows-Shell-Setup"
-class SettingNames(Enum):
+class SettingNames(str, Enum):
auto_logon = "AutoLogon"
first_logon_commands = "FirstLogonCommands"
-class ProtocolTypes(Enum):
+class ProtocolTypes(str, Enum):
http = "Http"
https = "Https"
-class ResourceIdentityType(Enum):
+class ResourceIdentityType(str, Enum):
system_assigned = "SystemAssigned"
-class MaintenanceOperationResultCodeTypes(Enum):
+class MaintenanceOperationResultCodeTypes(str, Enum):
none = "None"
retry_later = "RetryLater"
@@ -181,50 +181,50 @@ class MaintenanceOperationResultCodeTypes(Enum):
maintenance_completed = "MaintenanceCompleted"
-class UpgradeMode(Enum):
+class UpgradeMode(str, Enum):
automatic = "Automatic"
manual = "Manual"
rolling = "Rolling"
-class OperatingSystemStateTypes(Enum):
+class OperatingSystemStateTypes(str, Enum):
generalized = "Generalized"
specialized = "Specialized"
-class ResourceSkuCapacityScaleType(Enum):
+class ResourceSkuCapacityScaleType(str, Enum):
automatic = "Automatic"
manual = "Manual"
none = "None"
-class ResourceSkuRestrictionsType(Enum):
+class ResourceSkuRestrictionsType(str, Enum):
location = "Location"
-class ResourceSkuRestrictionsReasonCode(Enum):
+class ResourceSkuRestrictionsReasonCode(str, Enum):
quota_id = "QuotaId"
not_available_for_subscription = "NotAvailableForSubscription"
-class IPVersion(Enum):
+class IPVersion(str, Enum):
ipv4 = "IPv4"
ipv6 = "IPv6"
-class VirtualMachineScaleSetSkuScaleType(Enum):
+class VirtualMachineScaleSetSkuScaleType(str, Enum):
automatic = "Automatic"
none = "None"
-class RollingUpgradeStatusCode(Enum):
+class RollingUpgradeStatusCode(str, Enum):
rolling_forward = "RollingForward"
cancelled = "Cancelled"
@@ -232,13 +232,13 @@ class RollingUpgradeStatusCode(Enum):
faulted = "Faulted"
-class RollingUpgradeActionType(Enum):
+class RollingUpgradeActionType(str, Enum):
start = "Start"
cancel = "Cancel"
-class DiskCreateOption(Enum):
+class DiskCreateOption(str, Enum):
empty = "Empty"
attach = "Attach"
@@ -247,12 +247,12 @@ class DiskCreateOption(Enum):
copy = "Copy"
-class AccessLevel(Enum):
+class AccessLevel(str, Enum):
none = "None"
read = "Read"
-class InstanceViewTypes(Enum):
+class InstanceViewTypes(str, Enum):
instance_view = "instanceView"
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data.py
index 0892d7c17fdd..6a9ecbbaa1fe 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data.py
@@ -15,8 +15,10 @@
class CreationData(Model):
"""Data used when creating a disk.
- :param create_option: This enumerates the possible sources of a disk's
- creation. Possible values include: 'Empty', 'Attach', 'FromImage',
+ All required parameters must be populated in order to send to Azure.
+
+ :param create_option: Required. This enumerates the possible sources of a
+ disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage',
'Import', 'Copy'
:type create_option: str or
~azure.mgmt.compute.v2017_03_30.models.DiskCreateOption
@@ -47,10 +49,10 @@ class CreationData(Model):
'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'},
}
- def __init__(self, create_option, storage_account_id=None, image_reference=None, source_uri=None, source_resource_id=None):
- super(CreationData, self).__init__()
- self.create_option = create_option
- self.storage_account_id = storage_account_id
- self.image_reference = image_reference
- self.source_uri = source_uri
- self.source_resource_id = source_resource_id
+ def __init__(self, **kwargs):
+ super(CreationData, self).__init__(**kwargs)
+ self.create_option = kwargs.get('create_option', None)
+ self.storage_account_id = kwargs.get('storage_account_id', None)
+ self.image_reference = kwargs.get('image_reference', None)
+ self.source_uri = kwargs.get('source_uri', None)
+ self.source_resource_id = kwargs.get('source_resource_id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data_py3.py
new file mode 100644
index 000000000000..f548e7d19e89
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/creation_data_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 CreationData(Model):
+ """Data used when creating a disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param create_option: Required. This enumerates the possible sources of a
+ disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage',
+ 'Import', 'Copy'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOption
+ :param storage_account_id: If createOption is Import, the Azure Resource
+ Manager identifier of the storage account containing the blob to import as
+ a disk. Required only if the blob is in a different subscription
+ :type storage_account_id: str
+ :param image_reference: Disk source information.
+ :type image_reference:
+ ~azure.mgmt.compute.v2017_03_30.models.ImageDiskReference
+ :param source_uri: If createOption is Import, this is the URI of a blob to
+ be imported into a managed disk.
+ :type source_uri: str
+ :param source_resource_id: If createOption is Copy, this is the ARM id of
+ the source snapshot or disk.
+ :type source_resource_id: str
+ """
+
+ _validation = {
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOption'},
+ 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'},
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'},
+ 'source_uri': {'key': 'sourceUri', 'type': 'str'},
+ 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'},
+ }
+
+ def __init__(self, *, create_option, storage_account_id: str=None, image_reference=None, source_uri: str=None, source_resource_id: str=None, **kwargs) -> None:
+ super(CreationData, self).__init__(**kwargs)
+ self.create_option = create_option
+ self.storage_account_id = storage_account_id
+ self.image_reference = image_reference
+ self.source_uri = source_uri
+ self.source_resource_id = source_resource_id
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk.py
index 832a9a20bcc4..5a0bf58d6c10 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk.py
@@ -15,9 +15,11 @@
class DataDisk(Model):
"""Describes a data disk.
- :param 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.
+ 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
@@ -33,8 +35,8 @@ class DataDisk(Model):
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -68,13 +70,13 @@ class DataDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
}
- def __init__(self, lun, create_option, name=None, vhd=None, image=None, caching=None, disk_size_gb=None, managed_disk=None):
- super(DataDisk, self).__init__()
- self.lun = lun
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = kwargs.get('lun', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image.py
index 60a4befc525f..b5dbfcefb472 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image.py
@@ -32,6 +32,6 @@ class DataDiskImage(Model):
'lun': {'key': 'lun', 'type': 'int'},
}
- def __init__(self):
- super(DataDiskImage, self).__init__()
+ def __init__(self, **kwargs):
+ super(DataDiskImage, self).__init__(**kwargs)
self.lun = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_image_py3.py
new file mode 100644
index 000000000000..8431a3988502
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_py3.py
new file mode 100644
index 000000000000..ce4a52a28af6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/data_disk_py3.py
@@ -0,0 +1,82 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DataDisk(Model):
+ """Describes a data disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
+ :type lun: int
+ :param name: The disk name.
+ :type name: str
+ :param vhd: The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the 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.v2017_03_30.models.ManagedDiskParameters
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
+ }
+
+ def __init__(self, *, lun: int, create_option, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
+ super(DataDisk, self).__init__(**kwargs)
+ self.lun = lun
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile.py
index 0687c9f83aa8..36c128097209 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile.py
@@ -29,6 +29,6 @@ class DiagnosticsProfile(Model):
'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
}
- def __init__(self, boot_diagnostics=None):
- super(DiagnosticsProfile, self).__init__()
- self.boot_diagnostics = boot_diagnostics
+ 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/v2017_03_30/models/diagnostics_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/diagnostics_profile_py3.py
new file mode 100644
index 000000000000..30ba1b1a6c70
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.BootDiagnostics
+ """
+
+ _attribute_map = {
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
+ }
+
+ def __init__(self, *, boot_diagnostics=None, **kwargs) -> None:
+ super(DiagnosticsProfile, self).__init__(**kwargs)
+ self.boot_diagnostics = boot_diagnostics
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk.py
index 7e5d3529f5f5..555d543482ea 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk.py
@@ -18,13 +18,15 @@ class Disk(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -41,8 +43,8 @@ class Disk(Resource):
'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
- :param creation_data: Disk source information. CreationData information
- cannot be changed after the disk has been created.
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
:type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData
:param disk_size_gb: If creationData.createOption is Empty, this field is
mandatory and it indicates the size of the VHD to create. If this field is
@@ -85,14 +87,14 @@ class Disk(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, location, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb=None, encryption_settings=None):
- super(Disk, self).__init__(location=location, tags=tags)
+ def __init__(self, **kwargs):
+ super(Disk, self).__init__(**kwargs)
self.managed_by = None
- self.sku = sku
- self.zones = zones
+ self.sku = kwargs.get('sku', None)
+ self.zones = kwargs.get('zones', None)
self.time_created = None
- self.os_type = os_type
- self.creation_data = creation_data
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ self.os_type = kwargs.get('os_type', None)
+ self.creation_data = kwargs.get('creation_data', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings.py
index 7c5e1b8a467c..7f98ef395200 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings.py
@@ -34,8 +34,8 @@ class DiskEncryptionSettings(Model):
'enabled': {'key': 'enabled', 'type': 'bool'},
}
- def __init__(self, disk_encryption_key=None, key_encryption_key=None, enabled=None):
- super(DiskEncryptionSettings, self).__init__()
- self.disk_encryption_key = disk_encryption_key
- self.key_encryption_key = key_encryption_key
- self.enabled = enabled
+ 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/v2017_03_30/models/disk_encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_encryption_settings_py3.py
new file mode 100644
index 000000000000..8108da077a2a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.KeyVaultSecretReference
+ :param key_encryption_key: Specifies the location of the key encryption
+ key in Key Vault.
+ :type key_encryption_key:
+ ~azure.mgmt.compute.v2017_03_30.models.KeyVaultKeyReference
+ :param enabled: Specifies whether disk encryption should be enabled on the
+ virtual machine.
+ :type enabled: bool
+ """
+
+ _attribute_map = {
+ 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'},
+ 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'},
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ }
+
+ def __init__(self, *, disk_encryption_key=None, key_encryption_key=None, enabled: bool=None, **kwargs) -> None:
+ super(DiskEncryptionSettings, self).__init__(**kwargs)
+ self.disk_encryption_key = disk_encryption_key
+ self.key_encryption_key = key_encryption_key
+ self.enabled = enabled
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py
index 81f3506d1efb..e250408baa20 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py
@@ -32,8 +32,8 @@ class DiskInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, encryption_settings=None, statuses=None):
- super(DiskInstanceView, self).__init__()
- self.name = name
- self.encryption_settings = encryption_settings
- self.statuses = statuses
+ 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/v2017_03_30/models/disk_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view_py3.py
new file mode 100644
index 000000000000..f8d374a055f3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.DiskEncryptionSettings]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, encryption_settings=None, statuses=None, **kwargs) -> None:
+ super(DiskInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.encryption_settings = encryption_settings
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..979613707c9f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_py3.py
@@ -0,0 +1,100 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class Disk(Resource):
+ """Disk resource.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar managed_by: A relative URI containing the ID of the VM that has the
+ disk attached.
+ :vartype managed_by: str
+ :param sku:
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku
+ :param zones: The Logical zone list for Disk.
+ :type zones: list[str]
+ :ivar time_created: The time when the disk was created.
+ :vartype time_created: datetime
+ :param os_type: The Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
+ :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings
+ :ivar provisioning_state: The disk provisioning state.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'managed_by': {'readonly': True},
+ 'time_created': {'readonly': True},
+ 'creation_data': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'managed_by': {'key': 'managedBy', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'DiskSku'},
+ 'zones': {'key': 'zones', 'type': '[str]'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, creation_data, tags=None, sku=None, zones=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(Disk, self).__init__(location=location, tags=tags, **kwargs)
+ self.managed_by = None
+ self.sku = sku
+ self.zones = zones
+ self.time_created = None
+ self.os_type = os_type
+ self.creation_data = creation_data
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku.py
index 2abf11d8c488..64f47a7b75e3 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku.py
@@ -35,7 +35,7 @@ class DiskSku(Model):
'tier': {'key': 'tier', 'type': 'str'},
}
- def __init__(self, name=None):
- super(DiskSku, self).__init__()
- self.name = name
+ def __init__(self, **kwargs):
+ super(DiskSku, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
self.tier = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku_py3.py
new file mode 100644
index 000000000000..dae5211ac38c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_sku_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 DiskSku(Model):
+ """The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param name: The sku name. Possible values include: 'Standard_LRS',
+ 'Premium_LRS'
+ :type name: str or
+ ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes
+ :ivar tier: The sku tier. Default value: "Standard" .
+ :vartype tier: str
+ """
+
+ _validation = {
+ 'tier': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'StorageAccountTypes'},
+ 'tier': {'key': 'tier', 'type': 'str'},
+ }
+
+ def __init__(self, *, name=None, **kwargs) -> None:
+ super(DiskSku, self).__init__(**kwargs)
+ self.name = name
+ self.tier = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update.py
index 16c96d399464..1c62861a71cf 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update.py
@@ -42,8 +42,8 @@ class DiskUpdate(ResourceUpdate):
'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
}
- def __init__(self, tags=None, sku=None, os_type=None, disk_size_gb=None, encryption_settings=None):
- super(DiskUpdate, self).__init__(tags=tags, sku=sku)
- self.os_type = os_type
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ def __init__(self, **kwargs):
+ super(DiskUpdate, self).__init__(**kwargs)
+ self.os_type = kwargs.get('os_type', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
diff --git a/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
new file mode 100644
index 000000000000..ce585313920e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_update_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 .resource_update import ResourceUpdate
+
+
+class DiskUpdate(ResourceUpdate):
+ """Disk update resource.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku:
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku
+ :param os_type: the Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'DiskSku'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ }
+
+ def __init__(self, *, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(DiskUpdate, self).__init__(tags=tags, sku=sku, **kwargs)
+ self.os_type = os_type
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings.py
index 1d61393fc54d..a0ac101e9c77 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings.py
@@ -37,8 +37,8 @@ class EncryptionSettings(Model):
'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'},
}
- def __init__(self, enabled=None, disk_encryption_key=None, key_encryption_key=None):
- super(EncryptionSettings, self).__init__()
- self.enabled = enabled
- self.disk_encryption_key = disk_encryption_key
- self.key_encryption_key = key_encryption_key
+ def __init__(self, **kwargs):
+ super(EncryptionSettings, self).__init__(**kwargs)
+ self.enabled = kwargs.get('enabled', None)
+ self.disk_encryption_key = kwargs.get('disk_encryption_key', None)
+ self.key_encryption_key = kwargs.get('key_encryption_key', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings_py3.py
new file mode 100644
index 000000000000..6e0af2329bb4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/encryption_settings_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 EncryptionSettings(Model):
+ """Encryption settings for disk or snapshot.
+
+ :param enabled: Set this flag to true and provide DiskEncryptionKey and
+ optional KeyEncryptionKey to enable encryption. Set this flag to false and
+ remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If
+ EncryptionSettings is null in the request object, the existing settings
+ remain unchanged.
+ :type enabled: bool
+ :param disk_encryption_key: Key Vault Secret Url and vault id of the disk
+ encryption key
+ :type disk_encryption_key:
+ ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndSecretReference
+ :param key_encryption_key: Key Vault Key Url and vault id of the key
+ encryption key
+ :type key_encryption_key:
+ ~azure.mgmt.compute.v2017_03_30.models.KeyVaultAndKeyReference
+ """
+
+ _attribute_map = {
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'},
+ 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'},
+ }
+
+ def __init__(self, *, enabled: bool=None, disk_encryption_key=None, key_encryption_key=None, **kwargs) -> None:
+ super(EncryptionSettings, self).__init__(**kwargs)
+ self.enabled = enabled
+ self.disk_encryption_key = disk_encryption_key
+ self.key_encryption_key = key_encryption_key
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data.py
index d79c66dd63b6..df3466f4f99d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data.py
@@ -15,10 +15,12 @@
class GrantAccessData(Model):
"""Data used for requesting a SAS.
- :param access: Possible values include: 'None', 'Read'
+ All required parameters must be populated in order to send to Azure.
+
+ :param access: Required. Possible values include: 'None', 'Read'
:type access: str or ~azure.mgmt.compute.v2017_03_30.models.AccessLevel
- :param duration_in_seconds: Time duration in seconds until the SAS access
- expires.
+ :param duration_in_seconds: Required. Time duration in seconds until the
+ SAS access expires.
:type duration_in_seconds: int
"""
@@ -32,7 +34,7 @@ class GrantAccessData(Model):
'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'},
}
- def __init__(self, access, duration_in_seconds):
- super(GrantAccessData, self).__init__()
- self.access = access
- self.duration_in_seconds = duration_in_seconds
+ def __init__(self, **kwargs):
+ super(GrantAccessData, self).__init__(**kwargs)
+ self.access = kwargs.get('access', None)
+ self.duration_in_seconds = kwargs.get('duration_in_seconds', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data_py3.py
new file mode 100644
index 000000000000..828e923ac006
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/grant_access_data_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 GrantAccessData(Model):
+ """Data used for requesting a SAS.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param access: Required. Possible values include: 'None', 'Read'
+ :type access: str or ~azure.mgmt.compute.v2017_03_30.models.AccessLevel
+ :param duration_in_seconds: Required. Time duration in seconds until the
+ SAS access expires.
+ :type duration_in_seconds: int
+ """
+
+ _validation = {
+ 'access': {'required': True},
+ 'duration_in_seconds': {'required': True},
+ }
+
+ _attribute_map = {
+ 'access': {'key': 'access', 'type': 'AccessLevel'},
+ 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'},
+ }
+
+ def __init__(self, *, access, duration_in_seconds: int, **kwargs) -> None:
+ super(GrantAccessData, self).__init__(**kwargs)
+ self.access = access
+ self.duration_in_seconds = duration_in_seconds
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile.py
index 4f225f6209c7..573e0f20f88c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile.py
@@ -58,6 +58,6 @@ class HardwareProfile(Model):
'vm_size': {'key': 'vmSize', 'type': 'str'},
}
- def __init__(self, vm_size=None):
- super(HardwareProfile, self).__init__()
- self.vm_size = vm_size
+ 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/v2017_03_30/models/hardware_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile_py3.py
new file mode 100644
index 000000000000..ee352a2a83ab
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/hardware_profile_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 HardwareProfile(Model):
+ """Specifies the hardware settings for the virtual machine.
+
+ :param vm_size: Specifies the size of the virtual machine. For more
+ information about virtual machine sizes, see [Sizes for virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
The available VM sizes depend on region and availability set. For
+ a list of available sizes use these APIs:
[List all available
+ virtual machine sizes in an availability
+ set](virtualmachines-list-sizes-availability-set.md)
[List all
+ available virtual machine sizes in a
+ region](virtualmachines-list-sizes-region.md)
[List all available
+ virtual machine sizes for
+ resizing](virtualmachines-list-sizes-for-resizing.md). Possible values
+ include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4',
+ 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4',
+ 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9',
+ 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2',
+ 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2',
+ 'Standard_A8m_v2', 'Standard_D1', 'Standard_D2', 'Standard_D3',
+ 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13',
+ 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2',
+ 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2',
+ 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1',
+ 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11',
+ 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2',
+ 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2',
+ 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2',
+ 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_F1',
+ 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16',
+ 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s',
+ 'Standard_F16s', 'Standard_G1', 'Standard_G2', 'Standard_G3',
+ 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2',
+ 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_H8',
+ 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r',
+ 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s',
+ 'Standard_L32s', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24',
+ 'Standard_NC24r', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'
+ :type vm_size: str or
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineSizeTypes
+ """
+
+ _attribute_map = {
+ 'vm_size': {'key': 'vmSize', 'type': 'str'},
+ }
+
+ def __init__(self, *, vm_size=None, **kwargs) -> None:
+ super(HardwareProfile, self).__init__(**kwargs)
+ self.vm_size = vm_size
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image.py
index 442e6056b6e8..e045bc3eaade 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image.py
@@ -20,13 +20,15 @@ class Image(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -61,8 +63,8 @@ class Image(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, location, tags=None, source_virtual_machine=None, storage_profile=None):
- super(Image, self).__init__(location=location, tags=tags)
- self.source_virtual_machine = source_virtual_machine
- self.storage_profile = storage_profile
+ 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/v2017_03_30/models/image_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk.py
index 124157a65cfd..c30b35473476 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk.py
@@ -15,9 +15,11 @@
class ImageDataDisk(Model):
"""Describes a data disk.
- :param 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.
+ All required parameters must be populated in order to send to Azure.
+
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
:type lun: int
:param snapshot: The snapshot.
:type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource
@@ -55,12 +57,12 @@ class ImageDataDisk(Model):
'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
}
- def __init__(self, lun, snapshot=None, managed_disk=None, blob_uri=None, caching=None, disk_size_gb=None, storage_account_type=None):
- super(ImageDataDisk, self).__init__()
- 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
+ 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/v2017_03_30/models/image_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_data_disk_py3.py
new file mode 100644
index 000000000000..a553931a9d2a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.SubResource
+ :param managed_disk: The managedDisk.
+ :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource
+ :param blob_uri: The Virtual Hard Disk.
+ :type blob_uri: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
+ :param disk_size_gb: Specifies the size of empty data disks in gigabytes.
+ This element can be used to overwrite the name of the disk in a virtual
+ machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ :param storage_account_type: Specifies the storage account type for the
+ managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible
+ values include: 'Standard_LRS', 'Premium_LRS'
+ :type storage_account_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ }
+
+ _attribute_map = {
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'snapshot': {'key': 'snapshot', 'type': 'SubResource'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'},
+ 'blob_uri': {'key': 'blobUri', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
+ }
+
+ def __init__(self, *, lun: int, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None:
+ super(ImageDataDisk, self).__init__(**kwargs)
+ self.lun = lun
+ self.snapshot = snapshot
+ self.managed_disk = managed_disk
+ self.blob_uri = blob_uri
+ self.caching = caching
+ self.disk_size_gb = disk_size_gb
+ self.storage_account_type = storage_account_type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference.py
index e3f08988c180..247d532379fc 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference.py
@@ -15,8 +15,10 @@
class ImageDiskReference(Model):
"""The source image used for creating the disk.
- :param id: A relative uri containing either a Platform Imgage Repository
- or user image reference.
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Required. A relative uri containing either a Platform Imgage
+ Repository or user image reference.
:type id: str
:param lun: If the disk is created from an image's data disk, this is an
index that indicates which of the data disks in the image to use. For OS
@@ -33,7 +35,7 @@ class ImageDiskReference(Model):
'lun': {'key': 'lun', 'type': 'int'},
}
- def __init__(self, id, lun=None):
- super(ImageDiskReference, self).__init__()
- self.id = id
- self.lun = lun
+ def __init__(self, **kwargs):
+ super(ImageDiskReference, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.lun = kwargs.get('lun', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_reference_py3.py
new file mode 100644
index 000000000000..191563557acb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_disk_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 ImageDiskReference(Model):
+ """The source image used for creating the disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Required. A relative uri containing either a Platform Imgage
+ Repository or user image reference.
+ :type id: str
+ :param lun: If the disk is created from an image's data disk, this is an
+ index that indicates which of the data disks in the image to use. For OS
+ disks, this field is null.
+ :type lun: int
+ """
+
+ _validation = {
+ 'id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'lun': {'key': 'lun', 'type': 'int'},
+ }
+
+ def __init__(self, *, id: str, lun: int=None, **kwargs) -> None:
+ super(ImageDiskReference, self).__init__(**kwargs)
+ self.id = id
+ self.lun = lun
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk.py
index 9e656959bbcd..f1d05ae32c94 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk.py
@@ -15,14 +15,16 @@
class ImageOSDisk(Model):
"""Describes an Operating System disk.
- :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 a custom image.
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_type: Required. This property allows you to specify the type of
+ the OS that is included in the disk if creating a VM from a custom image.
Possible values are:
**Windows**
**Linux**.
Possible values include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
- :param os_state: The OS State. Possible values include: 'Generalized',
- 'Specialized'
+ :param os_state: Required. The OS State. Possible values include:
+ 'Generalized', 'Specialized'
:type os_state: str or
~azure.mgmt.compute.v2017_03_30.models.OperatingSystemStateTypes
:param snapshot: The snapshot.
@@ -63,13 +65,13 @@ class ImageOSDisk(Model):
'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
}
- def __init__(self, os_type, os_state, snapshot=None, managed_disk=None, blob_uri=None, caching=None, disk_size_gb=None, storage_account_type=None):
- super(ImageOSDisk, self).__init__()
- 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
+ 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/v2017_03_30/models/image_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_os_disk_py3.py
new file mode 100644
index 000000000000..1e7ac3e5bd13
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.OperatingSystemTypes
+ :param os_state: Required. The OS State. Possible values include:
+ 'Generalized', 'Specialized'
+ :type os_state: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemStateTypes
+ :param snapshot: The snapshot.
+ :type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SubResource
+ :param managed_disk: The managedDisk.
+ :type managed_disk: ~azure.mgmt.compute.v2017_03_30.models.SubResource
+ :param blob_uri: The Virtual Hard Disk.
+ :type blob_uri: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
+ :param disk_size_gb: Specifies the size of empty data disks in gigabytes.
+ This element can be used to overwrite the name of the disk in a virtual
+ machine image.
This value cannot be larger than 1023 GB
+ :type disk_size_gb: int
+ :param storage_account_type: Specifies the storage account type for the
+ managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible
+ values include: 'Standard_LRS', 'Premium_LRS'
+ :type storage_account_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes
+ """
+
+ _validation = {
+ 'os_type': {'required': True},
+ 'os_state': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'os_state': {'key': 'osState', 'type': 'OperatingSystemStateTypes'},
+ 'snapshot': {'key': 'snapshot', 'type': 'SubResource'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'SubResource'},
+ 'blob_uri': {'key': 'blobUri', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
+ }
+
+ def __init__(self, *, os_type, os_state, snapshot=None, managed_disk=None, blob_uri: str=None, caching=None, disk_size_gb: int=None, storage_account_type=None, **kwargs) -> None:
+ super(ImageOSDisk, self).__init__(**kwargs)
+ self.os_type = os_type
+ self.os_state = os_state
+ self.snapshot = snapshot
+ self.managed_disk = managed_disk
+ self.blob_uri = blob_uri
+ self.caching = caching
+ self.disk_size_gb = disk_size_gb
+ self.storage_account_type = storage_account_type
diff --git a/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
new file mode 100644
index 000000000000..103ab400bb6a
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import Resource
+
+
+class Image(Resource):
+ """The source user image virtual hard disk. The virtual hard disk will be
+ copied before being attached to the virtual machine. If SourceImage is
+ provided, the destination virtual hard drive must not exist.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param source_virtual_machine: The source virtual machine from which Image
+ is created.
+ :type source_virtual_machine:
+ ~azure.mgmt.compute.v2017_03_30.models.SubResource
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.ImageStorageProfile
+ :ivar provisioning_state: The provisioning state.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'},
+ 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, tags=None, source_virtual_machine=None, storage_profile=None, **kwargs) -> None:
+ super(Image, self).__init__(location=location, tags=tags, **kwargs)
+ self.source_virtual_machine = source_virtual_machine
+ self.storage_profile = storage_profile
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference.py
index 9ec2177fa5ad..b8f929f4ad70 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference.py
@@ -46,9 +46,9 @@ class ImageReference(SubResource):
'version': {'key': 'version', 'type': 'str'},
}
- def __init__(self, id=None, publisher=None, offer=None, sku=None, version=None):
- super(ImageReference, self).__init__(id=id)
- self.publisher = publisher
- self.offer = offer
- self.sku = sku
- self.version = version
+ 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/v2017_03_30/models/image_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_reference_py3.py
new file mode 100644
index 000000000000..f44047d4c087
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 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/v2017_03_30/models/image_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile.py
index 164867488a9f..6a62f7be35c9 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile.py
@@ -15,9 +15,11 @@
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
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_disk: Required. Specifies information about the operating system
+ disk used by the virtual machine.
For more information about
+ disks, see [About disks and VHDs for Azure virtual
machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
:type os_disk: ~azure.mgmt.compute.v2017_03_30.models.ImageOSDisk
:param data_disks: Specifies the parameters that are used to add a data
@@ -37,7 +39,7 @@ class ImageStorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'},
}
- def __init__(self, os_disk, data_disks=None):
- super(ImageStorageProfile, self).__init__()
- self.os_disk = os_disk
- self.data_disks = data_disks
+ def __init__(self, **kwargs):
+ super(ImageStorageProfile, self).__init__(**kwargs)
+ self.os_disk = kwargs.get('os_disk', None)
+ self.data_disks = kwargs.get('data_disks', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/image_storage_profile_py3.py
new file mode 100644
index 000000000000..af250086f9ab
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_disk: Required. Specifies information about the operating system
+ disk used by the virtual machine.
For more information about
+ disks, see [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.ImageOSDisk
+ :param data_disks: Specifies the parameters that are used to add a data
+ disk to a virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type data_disks:
+ list[~azure.mgmt.compute.v2017_03_30.models.ImageDataDisk]
+ """
+
+ _validation = {
+ 'os_disk': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_disk': {'key': 'osDisk', 'type': 'ImageOSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[ImageDataDisk]'},
+ }
+
+ def __init__(self, *, os_disk, data_disks=None, **kwargs) -> None:
+ super(ImageStorageProfile, self).__init__(**kwargs)
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error.py
index de77683e2fc8..6324249d7c19 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error.py
@@ -26,7 +26,7 @@ class InnerError(Model):
'errordetail': {'key': 'errordetail', 'type': 'str'},
}
- def __init__(self, exceptiontype=None, errordetail=None):
- super(InnerError, self).__init__()
- self.exceptiontype = exceptiontype
- self.errordetail = errordetail
+ 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/v2017_03_30/models/inner_error_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/inner_error_py3.py
new file mode 100644
index 000000000000..ccec30d7b53f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/instance_view_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status.py
index 0f26f2c6802c..bad5209dc286 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status.py
@@ -38,10 +38,10 @@ class InstanceViewStatus(Model):
'time': {'key': 'time', 'type': 'iso-8601'},
}
- def __init__(self, code=None, level=None, display_status=None, message=None, time=None):
- super(InstanceViewStatus, self).__init__()
- self.code = code
- self.level = level
- self.display_status = display_status
- self.message = message
- self.time = time
+ 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/v2017_03_30/models/instance_view_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/instance_view_status_py3.py
new file mode 100644
index 000000000000..a9cc415679e4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.StatusLevelTypes
+ :param display_status: The short localizable label for the status.
+ :type display_status: str
+ :param message: The detailed status message, including for alerts and
+ error messages.
+ :type message: str
+ :param time: The time of the status.
+ :type time: datetime
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'level': {'key': 'level', 'type': 'StatusLevelTypes'},
+ 'display_status': {'key': 'displayStatus', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'time': {'key': 'time', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, *, code: str=None, level=None, display_status: str=None, message: str=None, time=None, **kwargs) -> None:
+ super(InstanceViewStatus, self).__init__(**kwargs)
+ self.code = code
+ self.level = level
+ self.display_status = display_status
+ self.message = message
+ self.time = time
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference.py
index 57656e4ba02f..9b05d8d9a81f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference.py
@@ -16,10 +16,12 @@ class KeyVaultAndKeyReference(Model):
"""Key Vault Key Url and vault id of KeK, KeK is optional and when provided is
used to unwrap the encryptionKey.
- :param source_vault: Resource id of the KeyVault containing the key or
- secret
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
:type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault
- :param key_url: Url pointing to a key or secret in KeyVault
+ :param key_url: Required. Url pointing to a key or secret in KeyVault
:type key_url: str
"""
@@ -33,7 +35,7 @@ class KeyVaultAndKeyReference(Model):
'key_url': {'key': 'keyUrl', 'type': 'str'},
}
- def __init__(self, source_vault, key_url):
- super(KeyVaultAndKeyReference, self).__init__()
- self.source_vault = source_vault
- self.key_url = key_url
+ def __init__(self, **kwargs):
+ super(KeyVaultAndKeyReference, self).__init__(**kwargs)
+ self.source_vault = kwargs.get('source_vault', None)
+ self.key_url = kwargs.get('key_url', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_key_reference_py3.py
new file mode 100644
index 000000000000..524521adb8b3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_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 KeyVaultAndKeyReference(Model):
+ """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is
+ used to unwrap the encryptionKey.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
+ :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault
+ :param key_url: Required. Url pointing to a key or secret in KeyVault
+ :type key_url: str
+ """
+
+ _validation = {
+ 'source_vault': {'required': True},
+ 'key_url': {'required': True},
+ }
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'},
+ 'key_url': {'key': 'keyUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, source_vault, key_url: str, **kwargs) -> None:
+ super(KeyVaultAndKeyReference, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.key_url = key_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference.py
index c0f7f6d47092..8ca1e94d1ef4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference.py
@@ -15,10 +15,12 @@
class KeyVaultAndSecretReference(Model):
"""Key Vault Secret Url and vault id of the encryption key .
- :param source_vault: Resource id of the KeyVault containing the key or
- secret
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
:type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault
- :param secret_url: Url pointing to a key or secret in KeyVault
+ :param secret_url: Required. Url pointing to a key or secret in KeyVault
:type secret_url: str
"""
@@ -32,7 +34,7 @@ class KeyVaultAndSecretReference(Model):
'secret_url': {'key': 'secretUrl', 'type': 'str'},
}
- def __init__(self, source_vault, secret_url):
- super(KeyVaultAndSecretReference, self).__init__()
- self.source_vault = source_vault
- self.secret_url = secret_url
+ def __init__(self, **kwargs):
+ super(KeyVaultAndSecretReference, self).__init__(**kwargs)
+ self.source_vault = kwargs.get('source_vault', None)
+ self.secret_url = kwargs.get('secret_url', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_secret_reference_py3.py
new file mode 100644
index 000000000000..441f3b3e7474
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_and_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 KeyVaultAndSecretReference(Model):
+ """Key Vault Secret Url and vault id of the encryption key .
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param source_vault: Required. Resource id of the KeyVault containing the
+ key or secret
+ :type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SourceVault
+ :param secret_url: Required. Url pointing to a key or secret in KeyVault
+ :type secret_url: str
+ """
+
+ _validation = {
+ 'source_vault': {'required': True},
+ 'secret_url': {'required': True},
+ }
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'},
+ 'secret_url': {'key': 'secretUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, source_vault, secret_url: str, **kwargs) -> None:
+ super(KeyVaultAndSecretReference, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.secret_url = secret_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference.py
index 4f46bdcad394..92145037b737 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference.py
@@ -15,9 +15,13 @@
class KeyVaultKeyReference(Model):
"""Describes a reference to Key Vault Key.
- :param key_url: The URL referencing a key encryption key in Key Vault.
+ 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: The relative URL of the Key Vault containing the key.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the key.
:type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource
"""
@@ -31,7 +35,7 @@ class KeyVaultKeyReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, key_url, source_vault):
- super(KeyVaultKeyReference, self).__init__()
- self.key_url = key_url
- self.source_vault = source_vault
+ 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/v2017_03_30/models/key_vault_key_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_key_reference_py3.py
new file mode 100644
index 000000000000..33c5c26753a7
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.SubResource
+ """
+
+ _validation = {
+ 'key_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'key_url': {'key': 'keyUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, key_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultKeyReference, self).__init__(**kwargs)
+ self.key_url = key_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference.py
index 2a2f87ad36f8..08b6714cbc93 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference.py
@@ -15,10 +15,12 @@
class KeyVaultSecretReference(Model):
"""Describes a reference to Key Vault Secret.
- :param secret_url: The URL referencing a secret in a Key Vault.
+ 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: The relative URL of the Key Vault containing the
- secret.
+ :param source_vault: Required. The relative URL of the Key Vault
+ containing the secret.
:type source_vault: ~azure.mgmt.compute.v2017_03_30.models.SubResource
"""
@@ -32,7 +34,7 @@ class KeyVaultSecretReference(Model):
'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
}
- def __init__(self, secret_url, source_vault):
- super(KeyVaultSecretReference, self).__init__()
- self.secret_url = secret_url
- self.source_vault = source_vault
+ 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/v2017_03_30/models/key_vault_secret_reference_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/key_vault_secret_reference_py3.py
new file mode 100644
index 000000000000..08aee3ef629c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.SubResource
+ """
+
+ _validation = {
+ 'secret_url': {'required': True},
+ 'source_vault': {'required': True},
+ }
+
+ _attribute_map = {
+ 'secret_url': {'key': 'secretUrl', 'type': 'str'},
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ }
+
+ def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None:
+ super(KeyVaultSecretReference, self).__init__(**kwargs)
+ self.secret_url = secret_url
+ self.source_vault = source_vault
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration.py
index 7fba6293c431..07e5c9a55895 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration.py
@@ -33,7 +33,7 @@ class LinuxConfiguration(Model):
'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
}
- def __init__(self, disable_password_authentication=None, ssh=None):
- super(LinuxConfiguration, self).__init__()
- self.disable_password_authentication = disable_password_authentication
- self.ssh = ssh
+ 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/v2017_03_30/models/linux_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/linux_configuration_py3.py
new file mode 100644
index 000000000000..63d138590b0e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.SshConfiguration
+ """
+
+ _attribute_map = {
+ 'disable_password_authentication': {'key': 'disablePasswordAuthentication', 'type': 'bool'},
+ 'ssh': {'key': 'ssh', 'type': 'SshConfiguration'},
+ }
+
+ def __init__(self, *, disable_password_authentication: bool=None, ssh=None, **kwargs) -> None:
+ super(LinuxConfiguration, self).__init__(**kwargs)
+ self.disable_password_authentication = disable_password_authentication
+ self.ssh = ssh
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status.py
index fc17566b3701..183ed22922d3 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status.py
@@ -49,12 +49,12 @@ class MaintenanceRedeployStatus(Model):
'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'},
}
- def __init__(self, is_customer_initiated_maintenance_allowed=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=None):
- super(MaintenanceRedeployStatus, self).__init__()
- 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
+ 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/v2017_03_30/models/maintenance_redeploy_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/maintenance_redeploy_status_py3.py
new file mode 100644
index 000000000000..1d3532edebde
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.MaintenanceOperationResultCodeTypes
+ :param last_operation_message: Message returned for the last Maintenance
+ Operation.
+ :type last_operation_message: str
+ """
+
+ _attribute_map = {
+ 'is_customer_initiated_maintenance_allowed': {'key': 'isCustomerInitiatedMaintenanceAllowed', 'type': 'bool'},
+ 'pre_maintenance_window_start_time': {'key': 'preMaintenanceWindowStartTime', 'type': 'iso-8601'},
+ 'pre_maintenance_window_end_time': {'key': 'preMaintenanceWindowEndTime', 'type': 'iso-8601'},
+ 'maintenance_window_start_time': {'key': 'maintenanceWindowStartTime', 'type': 'iso-8601'},
+ 'maintenance_window_end_time': {'key': 'maintenanceWindowEndTime', 'type': 'iso-8601'},
+ 'last_operation_result_code': {'key': 'lastOperationResultCode', 'type': 'MaintenanceOperationResultCodeTypes'},
+ 'last_operation_message': {'key': 'lastOperationMessage', 'type': 'str'},
+ }
+
+ def __init__(self, *, is_customer_initiated_maintenance_allowed: bool=None, pre_maintenance_window_start_time=None, pre_maintenance_window_end_time=None, maintenance_window_start_time=None, maintenance_window_end_time=None, last_operation_result_code=None, last_operation_message: str=None, **kwargs) -> None:
+ super(MaintenanceRedeployStatus, self).__init__(**kwargs)
+ self.is_customer_initiated_maintenance_allowed = is_customer_initiated_maintenance_allowed
+ self.pre_maintenance_window_start_time = pre_maintenance_window_start_time
+ self.pre_maintenance_window_end_time = pre_maintenance_window_end_time
+ self.maintenance_window_start_time = maintenance_window_start_time
+ self.maintenance_window_end_time = maintenance_window_end_time
+ self.last_operation_result_code = last_operation_result_code
+ self.last_operation_message = last_operation_message
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters.py
index 1de0d42dc440..5bf0757e76a9 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/managed_disk_parameters.py
@@ -29,6 +29,6 @@ class ManagedDiskParameters(SubResource):
'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
}
- def __init__(self, id=None, storage_account_type=None):
- super(ManagedDiskParameters, self).__init__(id=id)
- self.storage_account_type = storage_account_type
+ 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/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
new file mode 100644
index 000000000000..d28adf8baf36
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import SubResource
+
+
+class ManagedDiskParameters(SubResource):
+ """The parameters of a managed disk.
+
+ :param id: Resource Id
+ :type id: str
+ :param storage_account_type: Specifies the storage account type for the
+ managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible
+ values include: 'Standard_LRS', 'Premium_LRS'
+ :type storage_account_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.StorageAccountTypes
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
+ }
+
+ def __init__(self, *, id: str=None, storage_account_type=None, **kwargs) -> None:
+ super(ManagedDiskParameters, self).__init__(id=id, **kwargs)
+ self.storage_account_type = storage_account_type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference.py
index 80c743c0d8e3..b86e305e3f74 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_interface_reference.py
@@ -27,6 +27,6 @@ class NetworkInterfaceReference(SubResource):
'primary': {'key': 'properties.primary', 'type': 'bool'},
}
- def __init__(self, id=None, primary=None):
- super(NetworkInterfaceReference, self).__init__(id=id)
- self.primary = primary
+ def __init__(self, **kwargs):
+ super(NetworkInterfaceReference, self).__init__(**kwargs)
+ self.primary = kwargs.get('primary', None)
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
new file mode 100644
index 000000000000..f42ead50fc36
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 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/v2017_03_30/models/network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile.py
index 9a50e7630e4f..fc0a548ab07b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile.py
@@ -25,6 +25,6 @@ class NetworkProfile(Model):
'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
}
- def __init__(self, network_interfaces=None):
- super(NetworkProfile, self).__init__()
- self.network_interfaces = network_interfaces
+ 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/v2017_03_30/models/network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/network_profile_py3.py
new file mode 100644
index 000000000000..f974d8eef777
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.NetworkInterfaceReference]
+ """
+
+ _attribute_map = {
+ 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterfaceReference]'},
+ }
+
+ def __init__(self, *, network_interfaces=None, **kwargs) -> None:
+ super(NetworkProfile, self).__init__(**kwargs)
+ self.network_interfaces = network_interfaces
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response.py
index 6e10430632a0..2a767a845e06 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response.py
@@ -46,8 +46,8 @@ class OperationStatusResponse(Model):
'error': {'key': 'error', 'type': 'ApiError'},
}
- def __init__(self):
- super(OperationStatusResponse, self).__init__()
+ def __init__(self, **kwargs):
+ super(OperationStatusResponse, self).__init__(**kwargs)
self.name = None
self.status = None
self.start_time = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response_py3.py
new file mode 100644
index 000000000000..94409eeb6db7
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/operation_status_response_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 OperationStatusResponse(Model):
+ """Operation status response.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: Operation ID
+ :vartype name: str
+ :ivar status: Operation status
+ :vartype status: str
+ :ivar start_time: Start time of the operation
+ :vartype start_time: datetime
+ :ivar end_time: End time of the operation
+ :vartype end_time: datetime
+ :ivar error: Api error
+ :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'status': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'end_time': {'readonly': True},
+ 'error': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'end_time': {'key': 'endTime', 'type': 'iso-8601'},
+ 'error': {'key': 'error', 'type': 'ApiError'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(OperationStatusResponse, self).__init__(**kwargs)
+ self.name = None
+ self.status = None
+ self.start_time = None
+ self.end_time = None
+ self.error = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk.py
index 884c505c2ebf..b30836ab57c7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk.py
@@ -18,6 +18,8 @@ class OSDisk(Model):
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**
@@ -42,8 +44,8 @@ class OSDisk(Model):
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
- :param create_option: Specifies how the virtual machine should be
- created.
Possible values are:
**Attach** \\u2013 This
+ :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
@@ -77,14 +79,14 @@ class OSDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
}
- def __init__(self, create_option, os_type=None, encryption_settings=None, name=None, vhd=None, image=None, caching=None, disk_size_gb=None, managed_disk=None):
- super(OSDisk, self).__init__()
- self.os_type = os_type
- self.encryption_settings = encryption_settings
- self.name = name
- self.vhd = vhd
- self.image = image
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = kwargs.get('os_type', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
+ self.name = kwargs.get('name', None)
+ self.vhd = kwargs.get('vhd', None)
+ self.image = kwargs.get('image', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image.py
index d5db85d07e80..41945d80b1eb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image.py
@@ -15,8 +15,10 @@
class OSDiskImage(Model):
"""Contains the os disk image information.
- :param operating_system: The operating system of the osDiskImage. Possible
- values include: 'Windows', 'Linux'
+ All required parameters must be populated in order to send to Azure.
+
+ :param operating_system: Required. The operating system of the
+ osDiskImage. Possible values include: 'Windows', 'Linux'
:type operating_system: str or
~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
"""
@@ -29,6 +31,6 @@ class OSDiskImage(Model):
'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
}
- def __init__(self, operating_system):
- super(OSDiskImage, self).__init__()
- self.operating_system = operating_system
+ 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/v2017_03_30/models/os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_image_py3.py
new file mode 100644
index 000000000000..0d1a5431f0cf
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.OperatingSystemTypes
+ """
+
+ _validation = {
+ 'operating_system': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
+ }
+
+ def __init__(self, *, operating_system, **kwargs) -> None:
+ super(OSDiskImage, self).__init__(**kwargs)
+ self.operating_system = operating_system
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_py3.py
new file mode 100644
index 000000000000..49610fe43158
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_disk_py3.py
@@ -0,0 +1,92 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class OSDisk(Model):
+ """Specifies information about the operating system disk used by the virtual
+ machine.
For more information about disks, see [About disks and
+ VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
+ :param encryption_settings: Specifies the encryption settings for the OS
+ Disk.
Minimum api-version: 2015-06-15
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.DiskEncryptionSettings
+ :param name: The disk name.
+ :type name: str
+ :param vhd: The virtual hard disk.
+ :type vhd: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk
+ :param image: The source user image virtual hard disk. The virtual hard
+ disk will be copied before being attached to the virtual machine. If
+ SourceImage is provided, the destination virtual hard drive must not
+ exist.
+ :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machine should
+ be created.
Possible values are:
**Attach** \\u2013 This
+ value is used when you are using a specialized disk to create the virtual
+ machine.
**FromImage** \\u2013 This value is used when you are
+ using an image to create the virtual machine. If you are using a platform
+ image, you also use the imageReference element described above. If you are
+ using a marketplace image, you also use the plan element previously
+ described. Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the 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.v2017_03_30.models.ManagedDiskParameters
+ """
+
+ _validation = {
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'encryption_settings': {'key': 'encryptionSettings', 'type': 'DiskEncryptionSettings'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
+ }
+
+ def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
+ super(OSDisk, self).__init__(**kwargs)
+ self.os_type = os_type
+ self.encryption_settings = encryption_settings
+ self.name = name
+ self.vhd = vhd
+ self.image = image
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile.py
index d5c4c24aff2a..688e872bdc9c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile.py
@@ -88,12 +88,12 @@ class OSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(OSProfile, self).__init__()
- 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
+ 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/v2017_03_30/models/os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/os_profile_py3.py
new file mode 100644
index 000000000000..53b946fb208f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.WindowsConfiguration
+ :param linux_configuration: Specifies the Linux operating system settings
+ on the virtual machine.
For a list of supported Linux
+ distributions, see [Linux on Azure-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+
For running non-endorsed distributions, see [Information for
+ Non-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration
+ :param secrets: Specifies set of certificates that should be installed
+ onto the virtual machine.
+ :type secrets:
+ list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name': {'key': 'computerName', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(OSProfile, self).__init__(**kwargs)
+ self.computer_name = computer_name
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan.py
index 772160aef635..d42b6b32cfac 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan.py
@@ -38,9 +38,9 @@ class Plan(Model):
'promotion_code': {'key': 'promotionCode', 'type': 'str'},
}
- def __init__(self, name=None, publisher=None, product=None, promotion_code=None):
- super(Plan, self).__init__()
- self.name = name
- self.publisher = publisher
- self.product = product
- self.promotion_code = promotion_code
+ 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/v2017_03_30/models/plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/plan_py3.py
new file mode 100644
index 000000000000..9cca2c78a123
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/purchase_plan.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan.py
index aa29cb02ab78..2e1509addca6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan.py
@@ -16,12 +16,15 @@ class PurchasePlan(Model):
"""Used for establishing the purchase context of any 3rd Party artifact
through MarketPlace.
- :param publisher: The publisher ID.
+ All required parameters must be populated in order to send to Azure.
+
+ :param publisher: Required. The publisher ID.
:type publisher: str
- :param name: The plan ID.
+ :param name: Required. The plan ID.
:type name: str
- :param product: Specifies the product of the image from the marketplace.
- This is the same value as Offer under the imageReference element.
+ :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
"""
@@ -37,8 +40,8 @@ class PurchasePlan(Model):
'product': {'key': 'product', 'type': 'str'},
}
- def __init__(self, publisher, name, product):
- super(PurchasePlan, self).__init__()
- self.publisher = publisher
- self.name = name
- self.product = product
+ 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/v2017_03_30/models/purchase_plan_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/purchase_plan_py3.py
new file mode 100644
index 000000000000..26f7996f1633
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource.py
index 10269b591c68..5dd7d481c685 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource.py
@@ -18,13 +18,15 @@ class Resource(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -45,10 +47,10 @@ class Resource(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, location, tags=None):
- super(Resource, self).__init__()
+ def __init__(self, **kwargs):
+ super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
- self.location = location
- self.tags = tags
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_py3.py
new file mode 100644
index 000000000000..2f3702caf609
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/resource_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku.py
index 0a2655561a3b..894acd3c6c97 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku.py
@@ -80,8 +80,8 @@ class ResourceSku(Model):
'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'},
}
- def __init__(self):
- super(ResourceSku, self).__init__()
+ def __init__(self, **kwargs):
+ super(ResourceSku, self).__init__(**kwargs)
self.resource_type = None
self.name = None
self.tier = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities.py
index 278f55789e9e..1248116584dd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities.py
@@ -34,7 +34,7 @@ class ResourceSkuCapabilities(Model):
'value': {'key': 'value', 'type': 'str'},
}
- def __init__(self):
- super(ResourceSkuCapabilities, self).__init__()
+ def __init__(self, **kwargs):
+ super(ResourceSkuCapabilities, self).__init__(**kwargs)
self.name = None
self.value = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities_py3.py
new file mode 100644
index 000000000000..c7a095c1f04b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capabilities_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 ResourceSkuCapabilities(Model):
+ """Describes The SKU capabilites object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: An invariant to describe the feature.
+ :vartype name: str
+ :ivar value: An invariant if the feature is measured by quantity.
+ :vartype value: str
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'value': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'value': {'key': 'value', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ResourceSkuCapabilities, self).__init__(**kwargs)
+ self.name = None
+ self.value = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity.py
index 6ff20e066825..38eb0d5c8764 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity.py
@@ -44,8 +44,8 @@ class ResourceSkuCapacity(Model):
'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'},
}
- def __init__(self):
- super(ResourceSkuCapacity, self).__init__()
+ def __init__(self, **kwargs):
+ super(ResourceSkuCapacity, self).__init__(**kwargs)
self.minimum = None
self.maximum = None
self.default = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_capacity_py3.py
new file mode 100644
index 000000000000..7117ed227846
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_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 ResourceSkuCapacity(Model):
+ """Describes scaling information of a SKU.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar minimum: The minimum capacity.
+ :vartype minimum: long
+ :ivar maximum: The maximum capacity that can be set.
+ :vartype maximum: long
+ :ivar default: The default capacity.
+ :vartype default: long
+ :ivar scale_type: The scale type applicable to the sku. Possible values
+ include: 'Automatic', 'Manual', 'None'
+ :vartype scale_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacityScaleType
+ """
+
+ _validation = {
+ 'minimum': {'readonly': True},
+ 'maximum': {'readonly': True},
+ 'default': {'readonly': True},
+ 'scale_type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'minimum': {'key': 'minimum', 'type': 'long'},
+ 'maximum': {'key': 'maximum', 'type': 'long'},
+ 'default': {'key': 'default', 'type': 'long'},
+ 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ResourceSkuCapacity, self).__init__(**kwargs)
+ self.minimum = None
+ self.maximum = None
+ self.default = None
+ self.scale_type = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs.py
index 103f21eb6428..293adaf0962c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs.py
@@ -38,8 +38,8 @@ class ResourceSkuCosts(Model):
'extended_unit': {'key': 'extendedUnit', 'type': 'str'},
}
- def __init__(self):
- super(ResourceSkuCosts, self).__init__()
+ def __init__(self, **kwargs):
+ super(ResourceSkuCosts, self).__init__(**kwargs)
self.meter_id = None
self.quantity = None
self.extended_unit = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs_py3.py
new file mode 100644
index 000000000000..59e7036807d6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_costs_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 ResourceSkuCosts(Model):
+ """Describes metadata for retrieving price info.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar meter_id: Used for querying price from commerce.
+ :vartype meter_id: str
+ :ivar quantity: The multiplier is needed to extend the base metered cost.
+ :vartype quantity: long
+ :ivar extended_unit: An invariant to show the extended unit.
+ :vartype extended_unit: str
+ """
+
+ _validation = {
+ 'meter_id': {'readonly': True},
+ 'quantity': {'readonly': True},
+ 'extended_unit': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'meter_id': {'key': 'meterID', 'type': 'str'},
+ 'quantity': {'key': 'quantity', 'type': 'long'},
+ 'extended_unit': {'key': 'extendedUnit', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ResourceSkuCosts, self).__init__(**kwargs)
+ self.meter_id = None
+ self.quantity = None
+ self.extended_unit = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_py3.py
new file mode 100644
index 000000000000..85fc2af934d3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_py3.py
@@ -0,0 +1,96 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class ResourceSku(Model):
+ """Describes an available Compute SKU.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar resource_type: The type of resource the SKU applies to.
+ :vartype resource_type: str
+ :ivar name: The name of SKU.
+ :vartype name: str
+ :ivar tier: Specifies the tier of virtual machines in a scale set.
Possible Values:
**Standard**
**Basic**
+ :vartype tier: str
+ :ivar size: The Size of the SKU.
+ :vartype size: str
+ :ivar family: The Family of this particular SKU.
+ :vartype family: str
+ :ivar kind: The Kind of resources that are supported in this SKU.
+ :vartype kind: str
+ :ivar capacity: Specifies the number of virtual machines in the scale set.
+ :vartype capacity:
+ ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapacity
+ :ivar locations: The set of locations that the SKU is available.
+ :vartype locations: list[str]
+ :ivar api_versions: The api versions that support this SKU.
+ :vartype api_versions: list[str]
+ :ivar costs: Metadata for retrieving price info.
+ :vartype costs:
+ list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCosts]
+ :ivar capabilities: A name value pair to describe the capability.
+ :vartype capabilities:
+ list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuCapabilities]
+ :ivar restrictions: The restrictions because of which SKU cannot be used.
+ This is empty if there are no restrictions.
+ :vartype restrictions:
+ list[~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictions]
+ """
+
+ _validation = {
+ 'resource_type': {'readonly': True},
+ 'name': {'readonly': True},
+ 'tier': {'readonly': True},
+ 'size': {'readonly': True},
+ 'family': {'readonly': True},
+ 'kind': {'readonly': True},
+ 'capacity': {'readonly': True},
+ 'locations': {'readonly': True},
+ 'api_versions': {'readonly': True},
+ 'costs': {'readonly': True},
+ 'capabilities': {'readonly': True},
+ 'restrictions': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'tier': {'key': 'tier', 'type': 'str'},
+ 'size': {'key': 'size', 'type': 'str'},
+ 'family': {'key': 'family', 'type': 'str'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'},
+ 'locations': {'key': 'locations', 'type': '[str]'},
+ 'api_versions': {'key': 'apiVersions', 'type': '[str]'},
+ 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'},
+ 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'},
+ 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ResourceSku, self).__init__(**kwargs)
+ self.resource_type = None
+ self.name = None
+ self.tier = None
+ self.size = None
+ self.family = None
+ self.kind = None
+ self.capacity = None
+ self.locations = None
+ self.api_versions = None
+ self.costs = None
+ self.capabilities = None
+ self.restrictions = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions.py
index 9e96fe54fbd5..fb13a519b831 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions.py
@@ -42,8 +42,8 @@ class ResourceSkuRestrictions(Model):
'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'},
}
- def __init__(self):
- super(ResourceSkuRestrictions, self).__init__()
+ def __init__(self, **kwargs):
+ super(ResourceSkuRestrictions, self).__init__(**kwargs)
self.type = None
self.values = None
self.reason_code = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions_py3.py
new file mode 100644
index 000000000000..9a4296e74dd0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_sku_restrictions_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 ResourceSkuRestrictions(Model):
+ """Describes scaling information of a SKU.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar type: The type of restrictions. Possible values include: 'Location'
+ :vartype type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsType
+ :ivar values: The value of restrictions. If the restriction type is set to
+ location. This would be different locations where the SKU is restricted.
+ :vartype values: list[str]
+ :ivar reason_code: The reason for restriction. Possible values include:
+ 'QuotaId', 'NotAvailableForSubscription'
+ :vartype reason_code: str or
+ ~azure.mgmt.compute.v2017_03_30.models.ResourceSkuRestrictionsReasonCode
+ """
+
+ _validation = {
+ 'type': {'readonly': True},
+ 'values': {'readonly': True},
+ 'reason_code': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'},
+ 'values': {'key': 'values', 'type': '[str]'},
+ 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ResourceSkuRestrictions, self).__init__(**kwargs)
+ self.type = None
+ self.values = None
+ self.reason_code = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update.py
index ae7e917c5585..949f11d6d91a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update.py
@@ -26,7 +26,7 @@ class ResourceUpdate(Model):
'sku': {'key': 'sku', 'type': 'DiskSku'},
}
- def __init__(self, tags=None, sku=None):
- super(ResourceUpdate, self).__init__()
- self.tags = tags
- self.sku = sku
+ def __init__(self, **kwargs):
+ super(ResourceUpdate, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+ self.sku = kwargs.get('sku', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update_py3.py
new file mode 100644
index 000000000000..97d1f52f4e74
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/resource_update_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 ResourceUpdate(Model):
+ """The Resource model definition.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku:
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'DiskSku'},
+ }
+
+ def __init__(self, *, tags=None, sku=None, **kwargs) -> None:
+ super(ResourceUpdate, self).__init__(**kwargs)
+ self.tags = tags
+ self.sku = sku
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy.py
index 40b1ca96380f..1eecaa5e2e65 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy.py
@@ -55,9 +55,9 @@ class RollingUpgradePolicy(Model):
'pause_time_between_batches': {'key': 'pauseTimeBetweenBatches', 'type': 'str'},
}
- def __init__(self, max_batch_instance_percent=None, max_unhealthy_instance_percent=None, max_unhealthy_upgraded_instance_percent=None, pause_time_between_batches=None):
- super(RollingUpgradePolicy, self).__init__()
- 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
+ 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/v2017_03_30/models/rolling_upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_policy_py3.py
new file mode 100644
index 000000000000..e698a382f112
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/rolling_upgrade_progress_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info.py
index 01d1624f1f4f..87e40590e275 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info.py
@@ -47,8 +47,8 @@ class RollingUpgradeProgressInfo(Model):
'pending_instance_count': {'key': 'pendingInstanceCount', 'type': 'int'},
}
- def __init__(self):
- super(RollingUpgradeProgressInfo, self).__init__()
+ 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
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_progress_info_py3.py
new file mode 100644
index 000000000000..060abc3063b4
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/rolling_upgrade_running_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status.py
index 01e837ff3ddc..e0ad273c569d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status.py
@@ -46,8 +46,8 @@ class RollingUpgradeRunningStatus(Model):
'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'},
}
- def __init__(self):
- super(RollingUpgradeRunningStatus, self).__init__()
+ def __init__(self, **kwargs):
+ super(RollingUpgradeRunningStatus, self).__init__(**kwargs)
self.code = None
self.start_time = None
self.last_action = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_running_status_py3.py
new file mode 100644
index 000000000000..dfc9888b3922
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.RollingUpgradeStatusCode
+ :ivar start_time: Start time of the upgrade.
+ :vartype start_time: datetime
+ :ivar last_action: The last action performed on the rolling upgrade.
+ Possible values include: 'Start', 'Cancel'
+ :vartype last_action: str or
+ ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeActionType
+ :ivar last_action_time: Last action time of the upgrade.
+ :vartype last_action_time: datetime
+ """
+
+ _validation = {
+ 'code': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'last_action': {'readonly': True},
+ 'last_action_time': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'RollingUpgradeStatusCode'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'last_action': {'key': 'lastAction', 'type': 'RollingUpgradeActionType'},
+ 'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(RollingUpgradeRunningStatus, self).__init__(**kwargs)
+ self.code = None
+ self.start_time = None
+ self.last_action = None
+ self.last_action_time = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info.py
index a5620c88f269..6edf813e207b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/rolling_upgrade_status_info.py
@@ -18,13 +18,15 @@ class RollingUpgradeStatusInfo(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -66,8 +68,8 @@ class RollingUpgradeStatusInfo(Resource):
'error': {'key': 'properties.error', 'type': 'ApiError'},
}
- def __init__(self, location, tags=None):
- super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags)
+ def __init__(self, **kwargs):
+ super(RollingUpgradeStatusInfo, self).__init__(**kwargs)
self.policy = None
self.running_status = None
self.progress = None
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
new file mode 100644
index 000000000000..bae19f30c775
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import Resource
+
+
+class RollingUpgradeStatusInfo(Resource):
+ """The status of the latest virtual machine scale set rolling upgrade.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar policy: The rolling upgrade policies applied for this upgrade.
+ :vartype policy:
+ ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy
+ :ivar running_status: Information about the current running state of the
+ overall upgrade.
+ :vartype running_status:
+ ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeRunningStatus
+ :ivar progress: Information about the number of virtual machine instances
+ in each upgrade state.
+ :vartype progress:
+ ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeProgressInfo
+ :ivar error: Error details for this upgrade, if there are any.
+ :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'policy': {'readonly': True},
+ 'running_status': {'readonly': True},
+ 'progress': {'readonly': True},
+ 'error': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'policy': {'key': 'properties.policy', 'type': 'RollingUpgradePolicy'},
+ 'running_status': {'key': 'properties.runningStatus', 'type': 'RollingUpgradeRunningStatus'},
+ 'progress': {'key': 'properties.progress', 'type': 'RollingUpgradeProgressInfo'},
+ 'error': {'key': 'properties.error', 'type': 'ApiError'},
+ }
+
+ def __init__(self, *, location: str, tags=None, **kwargs) -> None:
+ super(RollingUpgradeStatusInfo, self).__init__(location=location, tags=tags, **kwargs)
+ self.policy = None
+ self.running_status = None
+ self.progress = None
+ self.error = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document.py
index a46ce0ee1eb1..7d01415a6686 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document.py
@@ -15,19 +15,21 @@
class RunCommandDocument(RunCommandDocumentBase):
"""Describes the properties of a Run Command.
- :param schema: The VM run command schema.
+ 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: The VM run command id.
+ :param id: Required. The VM run command id.
:type id: str
- :param os_type: The Operating System type. Possible values include:
- 'Windows', 'Linux'
+ :param os_type: Required. The Operating System type. Possible values
+ include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
- :param label: The VM run command label.
+ :param label: Required. The VM run command label.
:type label: str
- :param description: The VM run command description.
+ :param description: Required. The VM run command description.
:type description: str
- :param script: The script to be executed.
+ :param script: Required. The script to be executed.
:type script: list[str]
:param parameters: The parameters used by the script.
:type parameters:
@@ -53,7 +55,7 @@ class RunCommandDocument(RunCommandDocumentBase):
'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'},
}
- def __init__(self, schema, id, os_type, label, description, script, parameters=None):
- super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description)
- self.script = script
- self.parameters = parameters
+ 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/v2017_03_30/models/run_command_document_base.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base.py
index 78d51f0924b4..b9df22a4daa7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base.py
@@ -15,17 +15,19 @@
class RunCommandDocumentBase(Model):
"""Describes the properties of a Run Command metadata.
- :param schema: The VM run command schema.
+ 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: The VM run command id.
+ :param id: Required. The VM run command id.
:type id: str
- :param os_type: The Operating System type. Possible values include:
- 'Windows', 'Linux'
+ :param os_type: Required. The Operating System type. Possible values
+ include: 'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
- :param label: The VM run command label.
+ :param label: Required. The VM run command label.
:type label: str
- :param description: The VM run command description.
+ :param description: Required. The VM run command description.
:type description: str
"""
@@ -45,10 +47,10 @@ class RunCommandDocumentBase(Model):
'description': {'key': 'description', 'type': 'str'},
}
- def __init__(self, schema, id, os_type, label, description):
- super(RunCommandDocumentBase, self).__init__()
- self.schema = schema
- self.id = id
- self.os_type = os_type
- self.label = label
- self.description = description
+ 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/v2017_03_30/models/run_command_document_base_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_document_base_py3.py
new file mode 100644
index 000000000000..91c55b1ad7f5
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.OperatingSystemTypes
+ :param label: Required. The VM run command label.
+ :type label: str
+ :param description: Required. The VM run command description.
+ :type description: str
+ """
+
+ _validation = {
+ 'schema': {'required': True},
+ 'id': {'required': True},
+ 'os_type': {'required': True},
+ 'label': {'required': True},
+ 'description': {'required': True},
+ }
+
+ _attribute_map = {
+ 'schema': {'key': '$schema', 'type': 'str'},
+ 'id': {'key': 'id', 'type': 'str'},
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'label': {'key': 'label', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ }
+
+ def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None:
+ super(RunCommandDocumentBase, self).__init__(**kwargs)
+ self.schema = schema
+ self.id = id
+ self.os_type = os_type
+ self.label = label
+ self.description = description
diff --git a/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
new file mode 100644
index 000000000000..8148374fdfd1
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import RunCommandDocumentBase
+
+
+class RunCommandDocument(RunCommandDocumentBase):
+ """Describes the properties of a Run Command.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param schema: Required. The VM run command schema.
+ :type schema: str
+ :param id: Required. The VM run command id.
+ :type id: str
+ :param os_type: Required. The Operating System type. Possible values
+ include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
+ :param label: Required. The VM run command label.
+ :type label: str
+ :param description: Required. The VM run command description.
+ :type description: str
+ :param script: Required. The script to be executed.
+ :type script: list[str]
+ :param parameters: The parameters used by the script.
+ :type parameters:
+ list[~azure.mgmt.compute.v2017_03_30.models.RunCommandParameterDefinition]
+ """
+
+ _validation = {
+ 'schema': {'required': True},
+ 'id': {'required': True},
+ 'os_type': {'required': True},
+ 'label': {'required': True},
+ 'description': {'required': True},
+ 'script': {'required': True},
+ }
+
+ _attribute_map = {
+ 'schema': {'key': '$schema', 'type': 'str'},
+ 'id': {'key': 'id', 'type': 'str'},
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'label': {'key': 'label', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'script': {'key': 'script', 'type': '[str]'},
+ 'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'},
+ }
+
+ def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None:
+ super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs)
+ self.script = script
+ self.parameters = parameters
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input.py
index a55184914abb..b21071138d78 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input.py
@@ -15,7 +15,9 @@
class RunCommandInput(Model):
"""Capture Virtual Machine parameters.
- :param command_id: The run command id.
+ 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.
@@ -35,8 +37,8 @@ class RunCommandInput(Model):
'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'},
}
- def __init__(self, command_id, script=None, parameters=None):
- super(RunCommandInput, self).__init__()
- self.command_id = command_id
- self.script = script
- self.parameters = parameters
+ 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/v2017_03_30/models/run_command_input_parameter.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter.py
index 6eb4db622454..cd76ad81bfa2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter.py
@@ -15,9 +15,11 @@
class RunCommandInputParameter(Model):
"""Describes the properties of a run command parameter.
- :param name: The run command parameter name.
+ 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: The run command parameter value.
+ :param value: Required. The run command parameter value.
:type value: str
"""
@@ -31,7 +33,7 @@ class RunCommandInputParameter(Model):
'value': {'key': 'value', 'type': 'str'},
}
- def __init__(self, name, value):
- super(RunCommandInputParameter, self).__init__()
- self.name = name
- self.value = value
+ 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/v2017_03_30/models/run_command_input_parameter_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_parameter_py3.py
new file mode 100644
index 000000000000..6013f038a1c3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/run_command_input_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_input_py3.py
new file mode 100644
index 000000000000..ea92282275ce
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.RunCommandInputParameter]
+ """
+
+ _validation = {
+ 'command_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'command_id': {'key': 'commandId', 'type': 'str'},
+ 'script': {'key': 'script', 'type': '[str]'},
+ 'parameters': {'key': 'parameters', 'type': '[RunCommandInputParameter]'},
+ }
+
+ def __init__(self, *, command_id: str, script=None, parameters=None, **kwargs) -> None:
+ super(RunCommandInput, self).__init__(**kwargs)
+ self.command_id = command_id
+ self.script = script
+ self.parameters = parameters
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition.py
index 1292feb3e9bd..e09f774d8241 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition.py
@@ -15,9 +15,11 @@
class RunCommandParameterDefinition(Model):
"""Describes the properties of a run command parameter.
- :param name: The run command parameter name.
+ 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: The run command parameter type.
+ :param type: Required. The run command parameter type.
:type type: str
:param default_value: The run command parameter default value.
:type default_value: str
@@ -38,9 +40,9 @@ class RunCommandParameterDefinition(Model):
'required': {'key': 'required', 'type': 'bool'},
}
- def __init__(self, name, type, default_value=None, required=False):
- super(RunCommandParameterDefinition, self).__init__()
- self.name = name
- self.type = type
- self.default_value = default_value
- self.required = required
+ 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/v2017_03_30/models/run_command_parameter_definition_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_parameter_definition_py3.py
new file mode 100644
index 000000000000..e5fbc708f965
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/run_command_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result.py
index aa5ada2ddd07..a72c4f194c8d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result.py
@@ -49,6 +49,6 @@ class RunCommandResult(OperationStatusResponse):
'output': {'key': 'properties.output', 'type': 'object'},
}
- def __init__(self, output=None):
- super(RunCommandResult, self).__init__()
- self.output = output
+ def __init__(self, **kwargs):
+ super(RunCommandResult, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
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
new file mode 100644
index 000000000000..02fbd534c279
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/run_command_result_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 .operation_status_response import OperationStatusResponse
+
+
+class RunCommandResult(OperationStatusResponse):
+ """Run command operation response.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: Operation ID
+ :vartype name: str
+ :ivar status: Operation status
+ :vartype status: str
+ :ivar start_time: Start time of the operation
+ :vartype start_time: datetime
+ :ivar end_time: End time of the operation
+ :vartype end_time: datetime
+ :ivar error: Api error
+ :vartype error: ~azure.mgmt.compute.v2017_03_30.models.ApiError
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'status': {'readonly': True},
+ 'start_time': {'readonly': True},
+ 'end_time': {'readonly': True},
+ 'error': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ 'start_time': {'key': 'startTime', 'type': 'iso-8601'},
+ 'end_time': {'key': 'endTime', 'type': 'iso-8601'},
+ 'error': {'key': 'error', 'type': 'ApiError'},
+ 'output': {'key': 'properties.output', 'type': 'object'},
+ }
+
+ def __init__(self, *, output=None, **kwargs) -> None:
+ super(RunCommandResult, self).__init__(, **kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku.py
index 16755dc57b65..5c07709435e0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku.py
@@ -31,8 +31,8 @@ class Sku(Model):
'capacity': {'key': 'capacity', 'type': 'long'},
}
- def __init__(self, name=None, tier=None, capacity=None):
- super(Sku, self).__init__()
- self.name = name
- self.tier = tier
- self.capacity = capacity
+ 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/v2017_03_30/models/sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sku_py3.py
new file mode 100644
index 000000000000..f6bc74afaadc
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/snapshot.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot.py
index 46826529218c..be778fd923b7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot.py
@@ -18,13 +18,15 @@ class Snapshot(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -38,8 +40,8 @@ class Snapshot(Resource):
'Windows', 'Linux'
:type os_type: str or
~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
- :param creation_data: Disk source information. CreationData information
- cannot be changed after the disk has been created.
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
:type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData
:param disk_size_gb: If creationData.createOption is Empty, this field is
mandatory and it indicates the size of the VHD to create. If this field is
@@ -81,13 +83,13 @@ class Snapshot(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, location, creation_data, tags=None, sku=None, os_type=None, disk_size_gb=None, encryption_settings=None):
- super(Snapshot, self).__init__(location=location, tags=tags)
+ def __init__(self, **kwargs):
+ super(Snapshot, self).__init__(**kwargs)
self.managed_by = None
- self.sku = sku
+ self.sku = kwargs.get('sku', None)
self.time_created = None
- self.os_type = os_type
- self.creation_data = creation_data
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ self.os_type = kwargs.get('os_type', None)
+ self.creation_data = kwargs.get('creation_data', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
self.provisioning_state = None
diff --git a/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
new file mode 100644
index 000000000000..efa9b70bfefe
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_py3.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 .resource import Resource
+
+
+class Snapshot(Resource):
+ """Snapshot resource.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar managed_by: Unused. Always Null.
+ :vartype managed_by: str
+ :param sku:
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku
+ :ivar time_created: The time when the disk was created.
+ :vartype time_created: datetime
+ :param os_type: The Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
+ :param creation_data: Required. Disk source information. CreationData
+ information cannot be changed after the disk has been created.
+ :type creation_data: ~azure.mgmt.compute.v2017_03_30.models.CreationData
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings
+ :ivar provisioning_state: The disk provisioning state.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'managed_by': {'readonly': True},
+ 'time_created': {'readonly': True},
+ 'creation_data': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'managed_by': {'key': 'managedBy', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'DiskSku'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, creation_data, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(Snapshot, self).__init__(location=location, tags=tags, **kwargs)
+ self.managed_by = None
+ self.sku = sku
+ self.time_created = None
+ self.os_type = os_type
+ self.creation_data = creation_data
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
+ self.provisioning_state = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update.py
index 06be0cadd70a..de7f5642a846 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update.py
@@ -42,8 +42,8 @@ class SnapshotUpdate(ResourceUpdate):
'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
}
- def __init__(self, tags=None, sku=None, os_type=None, disk_size_gb=None, encryption_settings=None):
- super(SnapshotUpdate, self).__init__(tags=tags, sku=sku)
- self.os_type = os_type
- self.disk_size_gb = disk_size_gb
- self.encryption_settings = encryption_settings
+ def __init__(self, **kwargs):
+ super(SnapshotUpdate, self).__init__(**kwargs)
+ self.os_type = kwargs.get('os_type', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.encryption_settings = kwargs.get('encryption_settings', None)
diff --git a/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
new file mode 100644
index 000000000000..5890514da5aa
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/snapshot_update_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 .resource_update import ResourceUpdate
+
+
+class SnapshotUpdate(ResourceUpdate):
+ """Snapshot update resource.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku:
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.DiskSku
+ :param os_type: the Operating System type. Possible values include:
+ 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
+ :param disk_size_gb: If creationData.createOption is Empty, this field is
+ mandatory and it indicates the size of the VHD to create. If this field is
+ present for updates or creation with other options, it indicates a resize.
+ Resizes are only allowed if the disk is not attached to a running VM, and
+ can only increase the disk's size.
+ :type disk_size_gb: int
+ :param encryption_settings: Encryption settings for disk or snapshot
+ :type encryption_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.EncryptionSettings
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'DiskSku'},
+ 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'},
+ 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
+ 'encryption_settings': {'key': 'properties.encryptionSettings', 'type': 'EncryptionSettings'},
+ }
+
+ def __init__(self, *, tags=None, sku=None, os_type=None, disk_size_gb: int=None, encryption_settings=None, **kwargs) -> None:
+ super(SnapshotUpdate, self).__init__(tags=tags, sku=sku, **kwargs)
+ self.os_type = os_type
+ self.disk_size_gb = disk_size_gb
+ self.encryption_settings = encryption_settings
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault.py
index 5f242d159d4c..9b16302ebbfb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault.py
@@ -24,6 +24,6 @@ class SourceVault(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(SourceVault, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(SourceVault, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault_py3.py
new file mode 100644
index 000000000000..13eea5461390
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/source_vault_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 SourceVault(Model):
+ """The vault id is an Azure Resource Manager Resoure id in the form
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}.
+
+ :param id: Resource Id
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(self, *, id: str=None, **kwargs) -> None:
+ super(SourceVault, self).__init__(**kwargs)
+ self.id = id
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration.py
index 120fd437d060..e5c7e9b2cabd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration.py
@@ -25,6 +25,6 @@ class SshConfiguration(Model):
'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
}
- def __init__(self, public_keys=None):
- super(SshConfiguration, self).__init__()
- self.public_keys = public_keys
+ 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/v2017_03_30/models/ssh_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_configuration_py3.py
new file mode 100644
index 000000000000..09fe7514dd72
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.SshPublicKey]
+ """
+
+ _attribute_map = {
+ 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
+ }
+
+ def __init__(self, *, public_keys=None, **kwargs) -> None:
+ super(SshConfiguration, self).__init__(**kwargs)
+ self.public_keys = public_keys
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key.py
index 2fe6756641cb..122e0d3b9fdd 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key.py
@@ -33,7 +33,7 @@ class SshPublicKey(Model):
'key_data': {'key': 'keyData', 'type': 'str'},
}
- def __init__(self, path=None, key_data=None):
- super(SshPublicKey, self).__init__()
- self.path = path
- self.key_data = key_data
+ 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/v2017_03_30/models/ssh_public_key_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/ssh_public_key_py3.py
new file mode 100644
index 000000000000..b16ee085b36b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile.py
index f10bdc762b45..300d5bc464f7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile.py
@@ -40,8 +40,8 @@ class StorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
}
- def __init__(self, image_reference=None, os_disk=None, data_disks=None):
- super(StorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
- self.data_disks = data_disks
+ 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/v2017_03_30/models/storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/storage_profile_py3.py
new file mode 100644
index 000000000000..1a256407486c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.ImageReference
+ :param os_disk: Specifies information about the operating system disk used
+ by the virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type os_disk: ~azure.mgmt.compute.v2017_03_30.models.OSDisk
+ :param data_disks: Specifies the parameters that are used to add a data
+ disk to a virtual machine.
For more information about disks, see
+ [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type data_disks: list[~azure.mgmt.compute.v2017_03_30.models.DataDisk]
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'OSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None:
+ super(StorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource.py
index b32875f54c8e..11e092cc6ff5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource.py
@@ -23,6 +23,6 @@ class SubResource(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self, id=None):
- super(SubResource, self).__init__()
- self.id = id
+ def __init__(self, **kwargs):
+ super(SubResource, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_py3.py
new file mode 100644
index 000000000000..29e5afee38f9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/sub_resource_read_only.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only.py
index 308c52a8420b..4a0ec466c0d4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only.py
@@ -30,6 +30,6 @@ class SubResourceReadOnly(Model):
'id': {'key': 'id', 'type': 'str'},
}
- def __init__(self):
- super(SubResourceReadOnly, self).__init__()
+ def __init__(self, **kwargs):
+ super(SubResourceReadOnly, self).__init__(**kwargs)
self.id = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_read_only_py3.py
new file mode 100644
index 000000000000..cb918e9a2ac6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/update_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource.py
index 404aae42f184..b1d2898ff082 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource.py
@@ -23,6 +23,6 @@ class UpdateResource(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, tags=None):
- super(UpdateResource, self).__init__()
- self.tags = tags
+ def __init__(self, **kwargs):
+ super(UpdateResource, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_resource_py3.py
new file mode 100644
index 000000000000..c06c17c124d9
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/update_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 UpdateResource(Model):
+ """The Update Resource model definition.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, tags=None, **kwargs) -> None:
+ super(UpdateResource, self).__init__(**kwargs)
+ self.tags = tags
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy.py
index 0b3c3e6dfc80..f80408916ab5 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy.py
@@ -38,8 +38,8 @@ class UpgradePolicy(Model):
'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'},
}
- def __init__(self, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade=None):
- super(UpgradePolicy, self).__init__()
- self.mode = mode
- self.rolling_upgrade_policy = rolling_upgrade_policy
- self.automatic_os_upgrade = automatic_os_upgrade
+ def __init__(self, **kwargs):
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = kwargs.get('mode', None)
+ self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None)
+ self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy_py3.py
new file mode 100644
index 000000000000..5ebb99df5bff
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/upgrade_policy_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 UpgradePolicy(Model):
+ """Describes an upgrade policy - automatic, manual, or rolling.
+
+ :param mode: Specifies the mode of an upgrade to virtual machines in the
+ scale set.
Possible values are:
**Manual** - You
+ control the application of updates to virtual machines in the scale set.
+ You do this by using the manualUpgrade action.
**Automatic** -
+ All virtual machines in the scale set are automatically updated at the
+ same time. Possible values include: 'Automatic', 'Manual', 'Rolling'
+ :type mode: str or ~azure.mgmt.compute.v2017_03_30.models.UpgradeMode
+ :param rolling_upgrade_policy: The configuration parameters used while
+ performing a rolling upgrade.
+ :type rolling_upgrade_policy:
+ ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradePolicy
+ :param automatic_os_upgrade: Whether OS upgrades should automatically be
+ applied to scale set instances in a rolling fashion when a newer version
+ of the image becomes available.
+ :type automatic_os_upgrade: bool
+ """
+
+ _attribute_map = {
+ 'mode': {'key': 'mode', 'type': 'UpgradeMode'},
+ 'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'},
+ 'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'},
+ }
+
+ def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, **kwargs) -> None:
+ super(UpgradePolicy, self).__init__(**kwargs)
+ self.mode = mode
+ self.rolling_upgrade_policy = rolling_upgrade_policy
+ self.automatic_os_upgrade = automatic_os_upgrade
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage.py
index d7bb82255ab5..810c694c9b8c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage.py
@@ -18,14 +18,16 @@ class Usage(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
- :ivar unit: An enum describing the unit of usage measurement. Default
- value: "Count" .
+ 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: The current usage of the resource.
+ :param current_value: Required. The current usage of the resource.
:type current_value: int
- :param limit: The maximum permitted usage of the resource.
+ :param limit: Required. The maximum permitted usage of the resource.
:type limit: long
- :param name: The name of the type of usage.
+ :param name: Required. The name of the type of usage.
:type name: ~azure.mgmt.compute.v2017_03_30.models.UsageName
"""
@@ -45,8 +47,8 @@ class Usage(Model):
unit = "Count"
- def __init__(self, current_value, limit, name):
- super(Usage, self).__init__()
- self.current_value = current_value
- self.limit = limit
- self.name = name
+ 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/v2017_03_30/models/usage_name.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name.py
index 799c1f896da3..e2560936493e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name.py
@@ -26,7 +26,7 @@ class UsageName(Model):
'localized_value': {'key': 'localizedValue', 'type': 'str'},
}
- def __init__(self, value=None, localized_value=None):
- super(UsageName, self).__init__()
- self.value = value
- self.localized_value = localized_value
+ 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/v2017_03_30/models/usage_name_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_name_py3.py
new file mode 100644
index 000000000000..ad0b77459f75
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/usage_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/usage_py3.py
new file mode 100644
index 000000000000..64100ce07d54
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.UsageName
+ """
+
+ _validation = {
+ 'unit': {'required': True, 'constant': True},
+ 'current_value': {'required': True},
+ 'limit': {'required': True},
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'unit': {'key': 'unit', 'type': 'str'},
+ 'current_value': {'key': 'currentValue', 'type': 'int'},
+ 'limit': {'key': 'limit', 'type': 'long'},
+ 'name': {'key': 'name', 'type': 'UsageName'},
+ }
+
+ unit = "Count"
+
+ def __init__(self, *, current_value: int, limit: int, name, **kwargs) -> None:
+ super(Usage, self).__init__(**kwargs)
+ self.current_value = current_value
+ self.limit = limit
+ self.name = name
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate.py
index 8d4d05955de4..b173def6f820 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate.py
@@ -40,7 +40,7 @@ class VaultCertificate(Model):
'certificate_store': {'key': 'certificateStore', 'type': 'str'},
}
- def __init__(self, certificate_url=None, certificate_store=None):
- super(VaultCertificate, self).__init__()
- self.certificate_url = certificate_url
- self.certificate_store = certificate_store
+ 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/v2017_03_30/models/vault_certificate_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_certificate_py3.py
new file mode 100644
index 000000000000..eda5ba1c3f1d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/vault_secret_group.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group.py
index 1a259a5f8d58..2001e0f4d9a6 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group.py
@@ -29,7 +29,7 @@ class VaultSecretGroup(Model):
'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
}
- def __init__(self, source_vault=None, vault_certificates=None):
- super(VaultSecretGroup, self).__init__()
- self.source_vault = source_vault
- self.vault_certificates = vault_certificates
+ 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/v2017_03_30/models/vault_secret_group_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/vault_secret_group_py3.py
new file mode 100644
index 000000000000..21f0c1c281d8
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.SubResource
+ :param vault_certificates: The list of key vault references in SourceVault
+ which contain certificates.
+ :type vault_certificates:
+ list[~azure.mgmt.compute.v2017_03_30.models.VaultCertificate]
+ """
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
+ }
+
+ def __init__(self, *, source_vault=None, vault_certificates=None, **kwargs) -> None:
+ super(VaultSecretGroup, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.vault_certificates = vault_certificates
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk.py
index af1725d302af..5e3ad9dea7d4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk.py
@@ -23,6 +23,6 @@ class VirtualHardDisk(Model):
'uri': {'key': 'uri', 'type': 'str'},
}
- def __init__(self, uri=None):
- super(VirtualHardDisk, self).__init__()
- self.uri = uri
+ def __init__(self, **kwargs):
+ super(VirtualHardDisk, self).__init__(**kwargs)
+ self.uri = kwargs.get('uri', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_hard_disk_py3.py
new file mode 100644
index 000000000000..9c069b95f084
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/virtual_machine.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine.py
index d4052612ceec..91200e1f8905 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine.py
@@ -18,13 +18,15 @@ class VirtualMachine(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -130,19 +132,19 @@ class VirtualMachine(Resource):
'zones': {'key': 'zones', 'type': '[str]'},
}
- def __init__(self, location, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type=None, identity=None, zones=None):
- super(VirtualMachine, self).__init__(location=location, tags=tags)
- 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
+ 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 = license_type
+ self.license_type = kwargs.get('license_type', None)
self.vm_id = None
self.resources = None
- self.identity = identity
- self.zones = zones
+ self.identity = kwargs.get('identity', None)
+ self.zones = kwargs.get('zones', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py
index 9f8e26f5acb7..a711ec14f83d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py
@@ -32,8 +32,8 @@ class VirtualMachineAgentInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, vm_agent_version=None, extension_handlers=None, statuses=None):
- super(VirtualMachineAgentInstanceView, self).__init__()
- self.vm_agent_version = vm_agent_version
- self.extension_handlers = extension_handlers
- self.statuses = statuses
+ 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/v2017_03_30/models/virtual_machine_agent_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_agent_instance_view_py3.py
new file mode 100644
index 000000000000..9925dfec860b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineExtensionHandlerInstanceView]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'vm_agent_version': {'key': 'vmAgentVersion', 'type': 'str'},
+ 'extension_handlers': {'key': 'extensionHandlers', 'type': '[VirtualMachineExtensionHandlerInstanceView]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, vm_agent_version: str=None, extension_handlers=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineAgentInstanceView, self).__init__(**kwargs)
+ self.vm_agent_version = vm_agent_version
+ self.extension_handlers = extension_handlers
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters.py
index b406f387ffed..4e6ffbea7a4f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters.py
@@ -15,12 +15,15 @@
class VirtualMachineCaptureParameters(Model):
"""Capture Virtual Machine parameters.
- :param vhd_prefix: The captured virtual hard disk's name prefix.
+ 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: The destination container name.
+ :param destination_container_name: Required. The destination container
+ name.
:type destination_container_name: str
- :param overwrite_vhds: Specifies whether to overwrite the destination
- virtual hard disk, in case of conflict.
+ :param overwrite_vhds: Required. Specifies whether to overwrite the
+ destination virtual hard disk, in case of conflict.
:type overwrite_vhds: bool
"""
@@ -36,8 +39,8 @@ class VirtualMachineCaptureParameters(Model):
'overwrite_vhds': {'key': 'overwriteVhds', 'type': 'bool'},
}
- def __init__(self, vhd_prefix, destination_container_name, overwrite_vhds):
- super(VirtualMachineCaptureParameters, self).__init__()
- self.vhd_prefix = vhd_prefix
- self.destination_container_name = destination_container_name
- self.overwrite_vhds = overwrite_vhds
+ 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/v2017_03_30/models/virtual_machine_capture_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_parameters_py3.py
new file mode 100644
index 000000000000..1866cdc23300
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/virtual_machine_capture_result.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result.py
index 95e26a427e83..2b0df7406a34 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result.py
@@ -26,6 +26,6 @@ class VirtualMachineCaptureResult(SubResource):
'output': {'key': 'properties.output', 'type': 'object'},
}
- def __init__(self, id=None, output=None):
- super(VirtualMachineCaptureResult, self).__init__(id=id)
- self.output = output
+ def __init__(self, **kwargs):
+ super(VirtualMachineCaptureResult, self).__init__(**kwargs)
+ self.output = kwargs.get('output', None)
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
new file mode 100644
index 000000000000..da449b8e9154
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_capture_result_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 .sub_resource import SubResource
+
+
+class VirtualMachineCaptureResult(SubResource):
+ """Resource Id.
+
+ :param id: Resource Id
+ :type id: str
+ :param output: Operation output data (raw JSON)
+ :type output: object
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'output': {'key': 'properties.output', 'type': 'object'},
+ }
+
+ def __init__(self, *, id: str=None, output=None, **kwargs) -> None:
+ super(VirtualMachineCaptureResult, self).__init__(id=id, **kwargs)
+ self.output = output
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension.py
index 1145d45ad01f..acca6db783aa 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension.py
@@ -18,13 +18,15 @@ class VirtualMachineExtension(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -82,14 +84,14 @@ class VirtualMachineExtension(Resource):
'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
}
- def __init__(self, location, tags=None, force_update_tag=None, publisher=None, virtual_machine_extension_type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None, instance_view=None):
- super(VirtualMachineExtension, self).__init__(location=location, tags=tags)
- 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
+ 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 = instance_view
+ self.instance_view = kwargs.get('instance_view', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view.py
index 6005246552d3..ce1652f57296 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view.py
@@ -30,8 +30,8 @@ class VirtualMachineExtensionHandlerInstanceView(Model):
'status': {'key': 'status', 'type': 'InstanceViewStatus'},
}
- def __init__(self, type=None, type_handler_version=None, status=None):
- super(VirtualMachineExtensionHandlerInstanceView, self).__init__()
- self.type = type
- self.type_handler_version = type_handler_version
- self.status = status
+ 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/v2017_03_30/models/virtual_machine_extension_handler_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_handler_instance_view_py3.py
new file mode 100644
index 000000000000..8cc721eca97b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.InstanceViewStatus
+ """
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'InstanceViewStatus'},
+ }
+
+ def __init__(self, *, type: str=None, type_handler_version: str=None, status=None, **kwargs) -> None:
+ super(VirtualMachineExtensionHandlerInstanceView, self).__init__(**kwargs)
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.status = status
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image.py
index 7614699a78da..7273e2b84754 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_image.py
@@ -18,23 +18,26 @@ class VirtualMachineExtensionImage(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
- :param operating_system: The operating system this extension supports.
- :type operating_system: str
- :param compute_role: The type of role (IaaS or PaaS) this extension
+ :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: The schema defined by publisher, where extension
- consumers should provide settings in a matching schema.
+ :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
@@ -69,10 +72,10 @@ class VirtualMachineExtensionImage(Resource):
'supports_multiple_extensions': {'key': 'properties.supportsMultipleExtensions', 'type': 'bool'},
}
- def __init__(self, location, operating_system, compute_role, handler_schema, tags=None, vm_scale_set_enabled=None, supports_multiple_extensions=None):
- super(VirtualMachineExtensionImage, self).__init__(location=location, tags=tags)
- 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
+ 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/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
new file mode 100644
index 000000000000..217accab02f0
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 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/v2017_03_30/models/virtual_machine_extension_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view.py
index 6468a0600bf5..911d11800a27 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view.py
@@ -38,10 +38,10 @@ class VirtualMachineExtensionInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, name=None, type=None, type_handler_version=None, substatuses=None, statuses=None):
- super(VirtualMachineExtensionInstanceView, self).__init__()
- self.name = name
- self.type = type
- self.type_handler_version = type_handler_version
- self.substatuses = substatuses
- self.statuses = statuses
+ 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/v2017_03_30/models/virtual_machine_extension_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_extension_instance_view_py3.py
new file mode 100644
index 000000000000..8a463c3bfe1c
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.InstanceViewStatus]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'},
+ 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs)
+ self.name = name
+ self.type = type
+ self.type_handler_version = type_handler_version
+ self.substatuses = substatuses
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..90ac643e6af3
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import Resource
+
+
+class VirtualMachineExtension(Resource):
+ """Describes a Virtual Machine Extension.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param force_update_tag: How the extension handler should be forced to
+ update even if the extension configuration has not changed.
+ :type force_update_tag: str
+ :param publisher: The name of the extension handler publisher.
+ :type publisher: str
+ :param virtual_machine_extension_type: Specifies the type of the
+ extension; an example is "CustomScriptExtension".
+ :type virtual_machine_extension_type: str
+ :param type_handler_version: Specifies the version of the script handler.
+ :type type_handler_version: str
+ :param auto_upgrade_minor_version: Indicates whether the extension should
+ use a newer minor version if one is available at deployment time. Once
+ deployed, however, the extension will not upgrade minor versions unless
+ redeployed, even with this property set to true.
+ :type auto_upgrade_minor_version: bool
+ :param settings: Json formatted public settings for the extension.
+ :type settings: object
+ :param protected_settings: The extension can contain either
+ protectedSettings or protectedSettingsFromKeyVault or no protected
+ settings at all.
+ :type protected_settings: object
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param instance_view: The virtual machine extension instance view.
+ :type instance_view:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'},
+ 'publisher': {'key': 'properties.publisher', 'type': 'str'},
+ 'virtual_machine_extension_type': {'key': 'properties.type', 'type': 'str'},
+ 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'},
+ 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'},
+ 'settings': {'key': 'properties.settings', 'type': 'object'},
+ 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'},
+ }
+
+ def __init__(self, *, location: str, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None:
+ super(VirtualMachineExtension, self).__init__(location=location, tags=tags, **kwargs)
+ self.force_update_tag = force_update_tag
+ self.publisher = publisher
+ self.virtual_machine_extension_type = virtual_machine_extension_type
+ self.type_handler_version = type_handler_version
+ self.auto_upgrade_minor_version = auto_upgrade_minor_version
+ self.settings = settings
+ self.protected_settings = protected_settings
+ self.provisioning_state = None
+ self.instance_view = instance_view
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status.py
index 430aca5066dd..3e090308f6e4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status.py
@@ -30,6 +30,6 @@ class VirtualMachineHealthStatus(Model):
'status': {'key': 'status', 'type': 'InstanceViewStatus'},
}
- def __init__(self):
- super(VirtualMachineHealthStatus, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineHealthStatus, self).__init__(**kwargs)
self.status = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_health_status_py3.py
new file mode 100644
index 000000000000..b8259077b098
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.InstanceViewStatus
+ """
+
+ _validation = {
+ 'status': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'InstanceViewStatus'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineHealthStatus, self).__init__(**kwargs)
+ self.status = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity.py
index 206c68c73457..c80cf2eb3930 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity.py
@@ -40,8 +40,8 @@ class VirtualMachineIdentity(Model):
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
}
- def __init__(self, type=None):
- super(VirtualMachineIdentity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
- self.type = type
+ self.type = kwargs.get('type', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity_py3.py
new file mode 100644
index 000000000000..b12f77bea153
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_identity_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 VirtualMachineIdentity(Model):
+ """Identity for the virtual machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of virtual machine identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id associated with the virtual machine.
+ :vartype tenant_id: str
+ :param type: The type of identity used for the virtual machine. Currently,
+ the only supported type is 'SystemAssigned', which implicitly creates an
+ identity. Possible values include: 'SystemAssigned'
+ :type type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ResourceIdentityType'},
+ }
+
+ def __init__(self, *, type=None, **kwargs) -> None:
+ super(VirtualMachineIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image.py
index cdf345460ef4..2d2fd671b549 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -50,8 +52,8 @@ class VirtualMachineImage(VirtualMachineImageResource):
'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
}
- def __init__(self, name, location, id=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None):
- super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags)
- self.plan = plan
- self.os_disk_image = os_disk_image
- self.data_disk_images = data_disk_images
+ 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/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
new file mode 100644
index 000000000000..91c71128968d
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import VirtualMachineImageResource
+
+
+class VirtualMachineImage(VirtualMachineImageResource):
+ """Describes a Virtual Machine Image.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The name of the resource.
+ :type name: str
+ :param location: Required. The supported Azure location of the resource.
+ :type location: str
+ :param tags: Specifies the tags that are assigned to the virtual machine.
+ For more information about using tags, see [Using tags to organize your
+ Azure
+ resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
+ :type tags: dict[str, str]
+ :param plan:
+ :type plan: ~azure.mgmt.compute.v2017_03_30.models.PurchasePlan
+ :param os_disk_image:
+ :type os_disk_image: ~azure.mgmt.compute.v2017_03_30.models.OSDiskImage
+ :param data_disk_images:
+ :type data_disk_images:
+ list[~azure.mgmt.compute.v2017_03_30.models.DataDiskImage]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'},
+ 'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'},
+ 'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
+ }
+
+ def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None:
+ super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs)
+ self.plan = plan
+ self.os_disk_image = os_disk_image
+ self.data_disk_images = data_disk_images
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource.py
index a7029041061d..8807cc8f391b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_image_resource.py
@@ -15,11 +15,13 @@
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: The name of the resource.
+ :param name: Required. The name of the resource.
:type name: str
- :param location: The supported Azure location of the resource.
+ :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
@@ -40,8 +42,8 @@ class VirtualMachineImageResource(SubResource):
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, name, location, id=None, tags=None):
- super(VirtualMachineImageResource, self).__init__(id=id)
- self.name = name
- self.location = location
- self.tags = tags
+ 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/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
new file mode 100644
index 000000000000..48a968bf2fbf
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 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/v2017_03_30/models/virtual_machine_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view.py
index d71d47d69eb9..e6c6b90ec611 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view.py
@@ -59,14 +59,14 @@ class VirtualMachineInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None):
- super(VirtualMachineInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.maintenance_redeploy_status = maintenance_redeploy_status
- self.disks = disks
- self.extensions = extensions
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
+ def __init__(self, **kwargs):
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
+ self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view_py3.py
new file mode 100644
index 000000000000..2466342d3503
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_instance_view_py3.py
@@ -0,0 +1,72 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineInstanceView(Model):
+ """The instance view of a virtual machine.
+
+ :param platform_update_domain: Specifies the update domain of the virtual
+ machine.
+ :type platform_update_domain: int
+ :param platform_fault_domain: Specifies the fault domain of the virtual
+ machine.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView
+ :param maintenance_redeploy_status: The Maintenance Operation status on
+ the virtual machine.
+ :type maintenance_redeploy_status:
+ ~azure.mgmt.compute.v2017_03_30.models.MaintenanceRedeployStatus
+ :param disks: The virtual machine disk information.
+ :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView]
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2017_03_30.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus]
+ """
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None:
+ super(VirtualMachineInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.maintenance_redeploy_status = maintenance_redeploy_status
+ self.disks = disks
+ self.extensions = extensions
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
diff --git a/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
new file mode 100644
index 000000000000..791291568f1b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import Resource
+
+
+class VirtualMachine(Resource):
+ """Describes a Virtual Machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2017_03_30.models.SubResource
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier
+ that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read
+ using platform BIOS commands.
+ :vartype vm_id: str
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]
+ :param identity: The identity of the virtual machine, if configured.
+ :type identity:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineIdentity
+ :param zones: The virtual machine zones.
+ :type zones: list[str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'vm_id': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'plan': {'key': 'plan', 'type': 'Plan'},
+ 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'},
+ 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'},
+ 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'},
+ 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'},
+ 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'DiagnosticsProfile'},
+ 'availability_set': {'key': 'properties.availabilitySet', 'type': 'SubResource'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineInstanceView'},
+ 'license_type': {'key': 'properties.licenseType', 'type': 'str'},
+ 'vm_id': {'key': 'properties.vmId', 'type': 'str'},
+ 'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
+ 'identity': {'key': 'identity', 'type': 'VirtualMachineIdentity'},
+ 'zones': {'key': 'zones', 'type': '[str]'},
+ }
+
+ def __init__(self, *, location: str, tags=None, plan=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type: str=None, identity=None, zones=None, **kwargs) -> None:
+ super(VirtualMachine, self).__init__(location=location, tags=tags, **kwargs)
+ self.plan = plan
+ self.hardware_profile = hardware_profile
+ self.storage_profile = storage_profile
+ self.os_profile = os_profile
+ self.network_profile = network_profile
+ self.diagnostics_profile = diagnostics_profile
+ self.availability_set = availability_set
+ self.provisioning_state = None
+ self.instance_view = None
+ self.license_type = license_type
+ self.vm_id = None
+ self.resources = None
+ self.identity = identity
+ self.zones = zones
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set.py
index f84a017b3f3d..70385ea757b0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSet(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -90,15 +92,15 @@ class VirtualMachineScaleSet(Resource):
'zones': {'key': 'zones', 'type': '[str]'},
}
- def __init__(self, location, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision=None, single_placement_group=None, identity=None, zones=None):
- super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags)
- self.sku = sku
- self.plan = plan
- self.upgrade_policy = upgrade_policy
- self.virtual_machine_profile = virtual_machine_profile
+ 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 = overprovision
+ self.overprovision = kwargs.get('overprovision', None)
self.unique_id = None
- self.single_placement_group = single_placement_group
- self.identity = identity
- self.zones = zones
+ self.single_placement_group = kwargs.get('single_placement_group', None)
+ self.identity = kwargs.get('identity', None)
+ self.zones = kwargs.get('zones', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk.py
index ca901ab3482c..43b4d78fe75d 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk.py
@@ -15,19 +15,21 @@
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: 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.
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
:type lun: int
:param caching: Specifies the caching requirements.
Possible
values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
- :param create_option: The create option. Possible values include:
- 'FromImage', 'Empty', 'Attach'
+ :param create_option: Required. The create option. Possible values
+ include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes
:param disk_size_gb: Specifies the size of an empty data disk in
@@ -53,11 +55,11 @@ class VirtualMachineScaleSetDataDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
}
- def __init__(self, lun, create_option, name=None, caching=None, disk_size_gb=None, managed_disk=None):
- super(VirtualMachineScaleSetDataDisk, self).__init__()
- self.name = name
- self.lun = lun
- self.caching = caching
- self.create_option = create_option
- self.disk_size_gb = disk_size_gb
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.lun = kwargs.get('lun', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.disk_size_gb = kwargs.get('disk_size_gb', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk_py3.py
new file mode 100644
index 000000000000..8fca185a969f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_data_disk_py3.py
@@ -0,0 +1,65 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetDataDisk(Model):
+ """Describes a virtual machine scale set data disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: The disk name.
+ :type name: str
+ :param lun: Required. Specifies the logical unit number of the data disk.
+ This value is used to identify data disks within the VM and therefore must
+ be unique for each data disk attached to a VM.
+ :type lun: int
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
+ :param create_option: Required. The create option. Possible values
+ include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes
+ :param disk_size_gb: Specifies the size of an empty data disk in
+ gigabytes. This element can be used to overwrite the 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.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters
+ """
+
+ _validation = {
+ 'lun': {'required': True},
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'lun': {'key': 'lun', 'type': 'int'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
+ }
+
+ def __init__(self, *, lun: int, create_option, name: str=None, caching=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetDataDisk, self).__init__(**kwargs)
+ self.name = name
+ self.lun = lun
+ self.caching = caching
+ self.create_option = create_option
+ self.disk_size_gb = disk_size_gb
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension.py
index 68e2be4e922d..24a487547a2a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension.py
@@ -67,14 +67,14 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
- def __init__(self, name=None, force_update_tag=None, publisher=None, type=None, type_handler_version=None, auto_upgrade_minor_version=None, settings=None, protected_settings=None):
- super(VirtualMachineScaleSetExtension, self).__init__()
- 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
+ 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/v2017_03_30/models/virtual_machine_scale_set_extension_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile.py
index dfa1466ae45b..5ac81fd695bb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetExtensionProfile(Model):
'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
}
- def __init__(self, extensions=None):
- super(VirtualMachineScaleSetExtensionProfile, self).__init__()
- self.extensions = extensions
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = kwargs.get('extensions', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_extension_profile_py3.py
new file mode 100644
index 000000000000..5970cc73e624
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineScaleSetExtension]
+ """
+
+ _attribute_map = {
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetExtension]'},
+ }
+
+ def __init__(self, *, extensions=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetExtensionProfile, self).__init__(**kwargs)
+ self.extensions = extensions
diff --git a/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
new file mode 100644
index 000000000000..2243c6ae1f04
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 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/v2017_03_30/models/virtual_machine_scale_set_identity.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity.py
index 79398a4e23a9..d7c55680208c 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity.py
@@ -42,8 +42,8 @@ class VirtualMachineScaleSetIdentity(Model):
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
}
- def __init__(self, type=None):
- super(VirtualMachineScaleSetIdentity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
- self.type = type
+ self.type = kwargs.get('type', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity_py3.py
new file mode 100644
index 000000000000..109730c06e1b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_identity_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 VirtualMachineScaleSetIdentity(Model):
+ """Identity for the virtual machine scale set.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of virtual machine scale set
+ identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id associated with the virtual machine scale
+ set.
+ :vartype tenant_id: str
+ :param type: The type of identity used for the virtual machine scale set.
+ Currently, the only supported type is 'SystemAssigned', which implicitly
+ creates an identity. Possible values include: 'SystemAssigned'
+ :type type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.ResourceIdentityType
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ResourceIdentityType'},
+ }
+
+ def __init__(self, *, type=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py
index ebad6930c03a..4c3ef65a1dd2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py
@@ -41,8 +41,8 @@ class VirtualMachineScaleSetInstanceView(Model):
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}
- def __init__(self, statuses=None):
- super(VirtualMachineScaleSetInstanceView, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
self.virtual_machine = None
self.extensions = None
- self.statuses = statuses
+ self.statuses = kwargs.get('statuses', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_py3.py
new file mode 100644
index 000000000000..4c8d32ed063f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineScaleSetInstanceViewStatusesSummary
+ :ivar extensions: The extensions information.
+ :vartype extensions:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMExtensionsSummary]
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus]
+ """
+
+ _validation = {
+ 'virtual_machine': {'readonly': True},
+ 'extensions': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'virtual_machine': {'key': 'virtualMachine', 'type': 'VirtualMachineScaleSetInstanceViewStatusesSummary'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineScaleSetVMExtensionsSummary]'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ }
+
+ def __init__(self, *, statuses=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceView, self).__init__(**kwargs)
+ self.virtual_machine = None
+ self.extensions = None
+ self.statuses = statuses
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py
index 00fb334a2d09..9c8bc6132317 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py
@@ -32,6 +32,6 @@ class VirtualMachineScaleSetInstanceViewStatusesSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary_py3.py
new file mode 100644
index 000000000000..28bf19b450f6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetInstanceViewStatusesSummary, self).__init__(**kwargs)
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration.py
index 1fb671d5a187..435f14097f05 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_ip_configuration.py
@@ -15,9 +15,11 @@
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: The IP configuration name.
+ :param name: Required. The IP configuration name.
:type name: str
:param subnet: Specifies the identifier of the subnet.
:type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference
@@ -69,13 +71,13 @@ class VirtualMachineScaleSetIPConfiguration(SubResource):
'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
}
- def __init__(self, name, id=None, subnet=None, primary=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):
- super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id)
- 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
+ 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/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
new file mode 100644
index 000000000000..f11b3584d844
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import SubResource
+
+
+class VirtualMachineScaleSetIPConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's IP configuration.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The IP configuration name.
+ :type name: str
+ :param subnet: Specifies the identifier of the subnet.
+ :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference
+ :param primary: Specifies the primary network interface in case the
+ virtual machine has more than 1 network interface.
+ :type primary: bool
+ :param public_ip_address_configuration: The publicIPAddressConfiguration.
+ :type public_ip_address_configuration:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfiguration
+ :param private_ip_address_version: Available from Api-Version 2017-03-30
+ onwards, it represents whether the specific ipconfiguration is IPv4 or
+ IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ Possible values include: 'IPv4', 'IPv6'
+ :type private_ip_address_version: str or
+ ~azure.mgmt.compute.v2017_03_30.models.IPVersion
+ :param application_gateway_backend_address_pools: Specifies an array of
+ references to backend address pools of application gateways. A scale set
+ can reference backend address pools of multiple application gateways.
+ Multiple scale sets cannot use the same application gateway.
+ :type application_gateway_backend_address_pools:
+ list[~azure.mgmt.compute.v2017_03_30.models.SubResource]
+ :param load_balancer_backend_address_pools: Specifies an array of
+ references to backend address pools of load balancers. A scale set can
+ reference backend address pools of one public and one internal load
+ balancer. Multiple scale sets cannot use the same load balancer.
+ :type load_balancer_backend_address_pools:
+ list[~azure.mgmt.compute.v2017_03_30.models.SubResource]
+ :param load_balancer_inbound_nat_pools: Specifies an array of references
+ to inbound Nat pools of the load balancers. A scale set can reference
+ inbound nat pools of one public and one internal load balancer. Multiple
+ scale sets cannot use the same load balancer
+ :type load_balancer_inbound_nat_pools:
+ list[~azure.mgmt.compute.v2017_03_30.models.SubResource]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'},
+ 'primary': {'key': 'properties.primary', 'type': 'bool'},
+ 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetPublicIPAddressConfiguration'},
+ 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'},
+ 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
+ }
+
+ def __init__(self, *, name: str, id: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetIPConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.subnet = subnet
+ self.primary = primary
+ self.public_ip_address_configuration = public_ip_address_configuration
+ self.private_ip_address_version = private_ip_address_version
+ self.application_gateway_backend_address_pools = application_gateway_backend_address_pools
+ self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
+ self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters.py
index 2f2fd1348fdf..d7dd53592e5e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters.py
@@ -26,6 +26,6 @@ class VirtualMachineScaleSetManagedDiskParameters(Model):
'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
}
- def __init__(self, storage_account_type=None):
- super(VirtualMachineScaleSetManagedDiskParameters, self).__init__()
- self.storage_account_type = storage_account_type
+ 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/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_managed_disk_parameters_py3.py
new file mode 100644
index 000000000000..58cd587c6b54
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.StorageAccountTypes
+ """
+
+ _attribute_map = {
+ 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountTypes'},
+ }
+
+ def __init__(self, *, storage_account_type=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetManagedDiskParameters, self).__init__(**kwargs)
+ self.storage_account_type = storage_account_type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration.py
index 1df5d9eb792b..69d2808f1ff2 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration.py
@@ -16,9 +16,11 @@ 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: The network configuration name.
+ :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.
@@ -33,8 +35,8 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource):
interfaces.
:type dns_settings:
~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings
- :param ip_configurations: Specifies the IP configurations of the network
- interface.
+ :param ip_configurations: Required. Specifies the IP configurations of the
+ network interface.
:type ip_configurations:
list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIPConfiguration]
"""
@@ -54,11 +56,11 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource):
'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
}
- def __init__(self, name, ip_configurations, id=None, primary=None, enable_accelerated_networking=None, network_security_group=None, dns_settings=None):
- super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id)
- 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
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.primary = kwargs.get('primary', None)
+ self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None)
+ self.network_security_group = kwargs.get('network_security_group', None)
+ self.dns_settings = kwargs.get('dns_settings', None)
+ self.ip_configurations = kwargs.get('ip_configurations', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings.py
index fa83c5a0b792..04e1c619383f 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings.py
@@ -24,6 +24,6 @@ class VirtualMachineScaleSetNetworkConfigurationDnsSettings(Model):
'dns_servers': {'key': 'dnsServers', 'type': '[str]'},
}
- def __init__(self, dns_servers=None):
- super(VirtualMachineScaleSetNetworkConfigurationDnsSettings, self).__init__()
- self.dns_servers = dns_servers
+ 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/v2017_03_30/models/virtual_machine_scale_set_network_configuration_dns_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/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/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
new file mode 100644
index 000000000000..0f184fa10b2f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_configuration_py3.py
@@ -0,0 +1,66 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .sub_resource import SubResource
+
+
+class VirtualMachineScaleSetNetworkConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's network
+ configurations.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: Required. The network configuration name.
+ :type name: str
+ :param primary: Specifies the primary network interface in case the
+ virtual machine has more than 1 network interface.
+ :type primary: bool
+ :param enable_accelerated_networking: Specifies whether the network
+ interface is accelerated networking-enabled.
+ :type enable_accelerated_networking: bool
+ :param network_security_group: The network security group.
+ :type network_security_group:
+ ~azure.mgmt.compute.v2017_03_30.models.SubResource
+ :param dns_settings: The dns settings to be applied on the network
+ interfaces.
+ :type dns_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings
+ :param ip_configurations: Required. Specifies the IP configurations of the
+ network interface.
+ :type ip_configurations:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIPConfiguration]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'ip_configurations': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'primary': {'key': 'properties.primary', 'type': 'bool'},
+ 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'},
+ 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'},
+ 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'},
+ 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'},
+ }
+
+ def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.primary = primary
+ self.enable_accelerated_networking = enable_accelerated_networking
+ self.network_security_group = network_security_group
+ self.dns_settings = dns_settings
+ self.ip_configurations = ip_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile.py
index 660f3d34c110..34fb37e837eb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile.py
@@ -32,7 +32,7 @@ class VirtualMachineScaleSetNetworkProfile(Model):
'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
}
- def __init__(self, health_probe=None, network_interface_configurations=None):
- super(VirtualMachineScaleSetNetworkProfile, self).__init__()
- self.health_probe = health_probe
- self.network_interface_configurations = network_interface_configurations
+ 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/v2017_03_30/models/virtual_machine_scale_set_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_network_profile_py3.py
new file mode 100644
index 000000000000..9189367b9b1f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.ApiEntityReference
+ :param network_interface_configurations: The list of network
+ configurations.
+ :type network_interface_configurations:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfiguration]
+ """
+
+ _attribute_map = {
+ 'health_probe': {'key': 'healthProbe', 'type': 'ApiEntityReference'},
+ 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetNetworkConfiguration]'},
+ }
+
+ def __init__(self, *, health_probe=None, network_interface_configurations=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetNetworkProfile, self).__init__(**kwargs)
+ self.health_probe = health_probe
+ self.network_interface_configurations = network_interface_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk.py
index dfc790fda218..c4d359b7fd46 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk.py
@@ -15,6 +15,8 @@
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
@@ -22,13 +24,13 @@ class VirtualMachineScaleSetOSDisk(Model):
Default: **None for Standard storage. ReadOnly for Premium
storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
:type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
- :param create_option: 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'
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes
:param os_type: This property allows you to specify the type of the OS
@@ -62,12 +64,12 @@ class VirtualMachineScaleSetOSDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
}
- def __init__(self, create_option, name=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None):
- super(VirtualMachineScaleSetOSDisk, self).__init__()
- self.name = name
- self.caching = caching
- self.create_option = create_option
- self.os_type = os_type
- self.image = image
- self.vhd_containers = vhd_containers
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.caching = kwargs.get('caching', None)
+ self.create_option = kwargs.get('create_option', None)
+ self.os_type = kwargs.get('os_type', None)
+ self.image = kwargs.get('image', None)
+ self.vhd_containers = kwargs.get('vhd_containers', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk_py3.py
new file mode 100644
index 000000000000..a0a05b14340b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_disk_py3.py
@@ -0,0 +1,75 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetOSDisk(Model):
+ """Describes a virtual machine scale set operating system disk.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: The disk name.
+ :type name: str
+ :param caching: Specifies the caching requirements.
Possible
+ values are:
**None**
**ReadOnly**
**ReadWrite**
+
Default: **None for Standard storage. ReadOnly for Premium
+ storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
+ :param create_option: Required. Specifies how the virtual machines in the
+ scale set should be created.
The only allowed value is:
+ **FromImage** \\u2013 This value is used when you are using an image to
+ create the virtual machine. If you are using a platform image, you also
+ use the imageReference element described above. If you are using a
+ marketplace image, you also use the plan element previously described.
+ Possible values include: 'FromImage', 'Empty', 'Attach'
+ :type create_option: str or
+ ~azure.mgmt.compute.v2017_03_30.models.DiskCreateOptionTypes
+ :param os_type: This property allows you to specify the type of the OS
+ that is included in the disk if creating a VM from user-image or a
+ specialized VHD.
Possible values are:
**Windows**
+
**Linux**. Possible values include: 'Windows', 'Linux'
+ :type os_type: str or
+ ~azure.mgmt.compute.v2017_03_30.models.OperatingSystemTypes
+ :param image: Specifies information about the unmanaged user image to base
+ the scale set on.
+ :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk
+ :param vhd_containers: Specifies the container urls that are used to store
+ operating system disks for the scale set.
+ :type vhd_containers: list[str]
+ :param managed_disk: The managed disk parameters.
+ :type managed_disk:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters
+ """
+
+ _validation = {
+ 'create_option': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
+ 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
+ }
+
+ def __init__(self, *, create_option, name: str=None, caching=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
+ self.name = name
+ self.caching = caching
+ self.create_option = create_option
+ self.os_type = os_type
+ self.image = image
+ self.vhd_containers = vhd_containers
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile.py
index 2fd62e806968..317633a0edf7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile.py
@@ -86,12 +86,12 @@ class VirtualMachineScaleSetOSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, computer_name_prefix=None, admin_username=None, admin_password=None, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(VirtualMachineScaleSetOSProfile, self).__init__()
- 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
+ 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/v2017_03_30/models/virtual_machine_scale_set_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_os_profile_py3.py
new file mode 100644
index 000000000000..1d7c698b243f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.WindowsConfiguration
+ :param linux_configuration: Specifies the Linux operating system settings
+ on the virtual machine.
For a list of supported Linux
+ distributions, see [Linux on Azure-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+
For running non-endorsed distributions, see [Information for
+ Non-Endorsed
+ Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration
+ :param secrets: Specifies set of certificates that should be installed
+ onto the virtual machines in the scale set.
+ :type secrets:
+ list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'computer_name_prefix': {'key': 'computerNamePrefix', 'type': 'str'},
+ 'admin_username': {'key': 'adminUsername', 'type': 'str'},
+ 'admin_password': {'key': 'adminPassword', 'type': 'str'},
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, computer_name_prefix: str=None, admin_username: str=None, admin_password: str=None, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetOSProfile, self).__init__(**kwargs)
+ self.computer_name_prefix = computer_name_prefix
+ self.admin_username = admin_username
+ self.admin_password = admin_password
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration.py
index c3bd84db31f0..72a44aa185c0 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration.py
@@ -16,7 +16,9 @@ class VirtualMachineScaleSetPublicIPAddressConfiguration(Model):
"""Describes a virtual machines scale set IP Configuration's PublicIPAddress
configuration.
- :param name: The publicIP address configuration name.
+ 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
@@ -36,8 +38,8 @@ class VirtualMachineScaleSetPublicIPAddressConfiguration(Model):
'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'},
}
- def __init__(self, name, idle_timeout_in_minutes=None, dns_settings=None):
- super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__()
- self.name = name
- self.idle_timeout_in_minutes = idle_timeout_in_minutes
- self.dns_settings = dns_settings
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None)
+ self.dns_settings = kwargs.get('dns_settings', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py
index b247010d8c4a..2fe562244372 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings.py
@@ -16,9 +16,11 @@ class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model):
"""Describes a virtual machines scale sets network configuration's DNS
settings.
- :param domain_name_label: 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
+ 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
"""
@@ -30,6 +32,6 @@ class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(Model):
'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'},
}
- def __init__(self, domain_name_label):
- super(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, self).__init__()
- self.domain_name_label = domain_name_label
+ 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/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_dns_settings_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/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/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_py3.py
new file mode 100644
index 000000000000..d4db0b75b9ba
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_public_ip_address_configuration_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 VirtualMachineScaleSetPublicIPAddressConfiguration(Model):
+ """Describes a virtual machines scale set IP Configuration's PublicIPAddress
+ configuration.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. The publicIP address configuration name.
+ :type name: str
+ :param idle_timeout_in_minutes: The idle timeout of the public IP address.
+ :type idle_timeout_in_minutes: int
+ :param dns_settings: The dns settings to be applied on the publicIP
+ addresses .
+ :type dns_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'},
+ 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'},
+ }
+
+ def __init__(self, *, name: str, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetPublicIPAddressConfiguration, self).__init__(**kwargs)
+ self.name = name
+ self.idle_timeout_in_minutes = idle_timeout_in_minutes
+ self.dns_settings = dns_settings
diff --git a/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
new file mode 100644
index 000000000000..f1058061da23
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_py3.py
@@ -0,0 +1,106 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .resource import Resource
+
+
+class VirtualMachineScaleSet(Resource):
+ """Describes a Virtual Machine Scale Set.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku: The virtual machine scale set sku.
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan
+ :param upgrade_policy: The upgrade policy.
+ :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy
+ :param virtual_machine_profile: The virtual machine profile.
+ :type virtual_machine_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMProfile
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param overprovision: Specifies whether the Virtual Machine Scale Set
+ should be overprovisioned.
+ :type overprovision: bool
+ :ivar unique_id: Specifies the ID which uniquely identifies a Virtual
+ Machine Scale Set.
+ :vartype unique_id: str
+ :param single_placement_group: When true this limits the scale set to a
+ single placement group, of max size 100 virtual machines.
+ :type single_placement_group: bool
+ :param identity: The identity of the virtual machine scale set, if
+ configured.
+ :type identity:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity
+ :param zones: The virtual machine scale set zones.
+ :type zones: list[str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'unique_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'plan': {'key': 'plan', 'type': 'Plan'},
+ 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'},
+ 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetVMProfile'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'},
+ 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'},
+ 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'},
+ 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
+ 'zones': {'key': 'zones', 'type': '[str]'},
+ }
+
+ def __init__(self, *, location: str, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, zones=None, **kwargs) -> None:
+ super(VirtualMachineScaleSet, self).__init__(location=location, tags=tags, **kwargs)
+ self.sku = sku
+ self.plan = plan
+ self.upgrade_policy = upgrade_policy
+ self.virtual_machine_profile = virtual_machine_profile
+ self.provisioning_state = None
+ self.overprovision = overprovision
+ self.unique_id = None
+ self.single_placement_group = single_placement_group
+ self.identity = identity
+ self.zones = zones
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku.py
index c96da40cf31e..7df68f8507c3 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku.py
@@ -39,8 +39,8 @@ class VirtualMachineScaleSetSku(Model):
'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSku, self).__init__()
+ 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/v2017_03_30/models/virtual_machine_scale_set_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity.py
index 5557b650935c..9b483b29e72b 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity.py
@@ -44,8 +44,8 @@ class VirtualMachineScaleSetSkuCapacity(Model):
'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
}
- def __init__(self):
- super(VirtualMachineScaleSetSkuCapacity, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
self.minimum = None
self.maximum = None
self.default_capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_capacity_py3.py
new file mode 100644
index 000000000000..167f1b55495e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineScaleSetSkuScaleType
+ """
+
+ _validation = {
+ 'minimum': {'readonly': True},
+ 'maximum': {'readonly': True},
+ 'default_capacity': {'readonly': True},
+ 'scale_type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'minimum': {'key': 'minimum', 'type': 'long'},
+ 'maximum': {'key': 'maximum', 'type': 'long'},
+ 'default_capacity': {'key': 'defaultCapacity', 'type': 'long'},
+ 'scale_type': {'key': 'scaleType', 'type': 'VirtualMachineScaleSetSkuScaleType'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSkuCapacity, self).__init__(**kwargs)
+ self.minimum = None
+ self.maximum = None
+ self.default_capacity = None
+ self.scale_type = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_sku_py3.py
new file mode 100644
index 000000000000..3855816f1f80
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.Sku
+ :ivar capacity: Specifies the number of virtual machines in the scale set.
+ :vartype capacity:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetSkuCapacity
+ """
+
+ _validation = {
+ 'resource_type': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'capacity': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'capacity': {'key': 'capacity', 'type': 'VirtualMachineScaleSetSkuCapacity'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetSku, self).__init__(**kwargs)
+ self.resource_type = None
+ self.sku = None
+ self.capacity = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile.py
index a5be051cbe71..eea90cc9e86e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile.py
@@ -42,8 +42,8 @@ class VirtualMachineScaleSetStorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'},
}
- def __init__(self, image_reference=None, os_disk=None, data_disks=None):
- super(VirtualMachineScaleSetStorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
- self.data_disks = data_disks
+ 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/v2017_03_30/models/virtual_machine_scale_set_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_storage_profile_py3.py
new file mode 100644
index 000000000000..e36c69eb5668
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.ImageReference
+ :param os_disk: Specifies information about the operating system disk used
+ by the virtual machines in the scale set.
For more information
+ about disks, see [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type os_disk:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSDisk
+ :param data_disks: Specifies the parameters that are used to add data
+ disks to the virtual machines in the scale set.
For more
+ information about disks, see [About disks and VHDs for Azure virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ :type data_disks:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk]
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetOSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetStorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update.py
index 813afe4cbf2a..f0e05bd78e2e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update.py
@@ -50,12 +50,12 @@ class VirtualMachineScaleSetUpdate(UpdateResource):
'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
}
- def __init__(self, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision=None, single_placement_group=None, identity=None):
- super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags)
- 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
+ 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/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration.py
index 5471c4d8a9de..4e40f478cf3a 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_ip_configuration.py
@@ -59,13 +59,13 @@ class VirtualMachineScaleSetUpdateIPConfiguration(SubResource):
'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
}
- def __init__(self, id=None, name=None, subnet=None, primary=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):
- super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id)
- 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
+ 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/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
new file mode 100644
index 000000000000..f7860d495575
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import SubResource
+
+
+class VirtualMachineScaleSetUpdateIPConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's IP configuration.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: The IP configuration name.
+ :type name: str
+ :param subnet: The subnet.
+ :type subnet: ~azure.mgmt.compute.v2017_03_30.models.ApiEntityReference
+ :param primary: Specifies the primary IP Configuration in case the network
+ interface has more than one IP Configuration.
+ :type primary: bool
+ :param public_ip_address_configuration: The publicIPAddressConfiguration.
+ :type public_ip_address_configuration:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration
+ :param private_ip_address_version: Available from Api-Version 2017-03-30
+ onwards, it represents whether the specific ipconfiguration is IPv4 or
+ IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ Possible values include: 'IPv4', 'IPv6'
+ :type private_ip_address_version: str or
+ ~azure.mgmt.compute.v2017_03_30.models.IPVersion
+ :param application_gateway_backend_address_pools: The application gateway
+ backend address pools.
+ :type application_gateway_backend_address_pools:
+ list[~azure.mgmt.compute.v2017_03_30.models.SubResource]
+ :param load_balancer_backend_address_pools: The load balancer backend
+ address pools.
+ :type load_balancer_backend_address_pools:
+ list[~azure.mgmt.compute.v2017_03_30.models.SubResource]
+ :param load_balancer_inbound_nat_pools: The load balancer inbound nat
+ pools.
+ :type load_balancer_inbound_nat_pools:
+ list[~azure.mgmt.compute.v2017_03_30.models.SubResource]
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'subnet': {'key': 'properties.subnet', 'type': 'ApiEntityReference'},
+ 'primary': {'key': 'properties.primary', 'type': 'bool'},
+ 'public_ip_address_configuration': {'key': 'properties.publicIPAddressConfiguration', 'type': 'VirtualMachineScaleSetUpdatePublicIPAddressConfiguration'},
+ 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'},
+ 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[SubResource]'},
+ 'load_balancer_inbound_nat_pools': {'key': 'properties.loadBalancerInboundNatPools', 'type': '[SubResource]'},
+ }
+
+ def __init__(self, *, id: str=None, name: str=None, subnet=None, primary: bool=None, public_ip_address_configuration=None, private_ip_address_version=None, application_gateway_backend_address_pools=None, load_balancer_backend_address_pools=None, load_balancer_inbound_nat_pools=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdateIPConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.subnet = subnet
+ self.primary = primary
+ self.public_ip_address_configuration = public_ip_address_configuration
+ self.private_ip_address_version = private_ip_address_version
+ self.application_gateway_backend_address_pools = application_gateway_backend_address_pools
+ self.load_balancer_backend_address_pools = load_balancer_backend_address_pools
+ self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration.py
index 47c8d95525ab..d4b239a579d3 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration.py
@@ -47,11 +47,11 @@ class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource):
'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'},
}
- def __init__(self, id=None, name=None, primary=None, enable_accelerated_networking=None, network_security_group=None, dns_settings=None, ip_configurations=None):
- super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id)
- 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
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.primary = kwargs.get('primary', None)
+ self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None)
+ self.network_security_group = kwargs.get('network_security_group', None)
+ self.dns_settings = kwargs.get('dns_settings', None)
+ self.ip_configurations = kwargs.get('ip_configurations', None)
diff --git a/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
new file mode 100644
index 000000000000..9ff9c77dc275
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_configuration_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 .sub_resource import SubResource
+
+
+class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource):
+ """Describes a virtual machine scale set network profile's network
+ configurations.
+
+ :param id: Resource Id
+ :type id: str
+ :param name: The network configuration name.
+ :type name: str
+ :param primary: Whether this is a primary NIC on a virtual machine.
+ :type primary: bool
+ :param enable_accelerated_networking: Specifies whether the network
+ interface is accelerated networking-enabled.
+ :type enable_accelerated_networking: bool
+ :param network_security_group: The network security group.
+ :type network_security_group:
+ ~azure.mgmt.compute.v2017_03_30.models.SubResource
+ :param dns_settings: The dns settings to be applied on the network
+ interfaces.
+ :type dns_settings:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings
+ :param ip_configurations: The virtual machine scale set IP Configuration.
+ :type ip_configurations:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateIPConfiguration]
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'primary': {'key': 'properties.primary', 'type': 'bool'},
+ 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'},
+ 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'},
+ 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'},
+ 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'},
+ }
+
+ def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs)
+ self.name = name
+ self.primary = primary
+ self.enable_accelerated_networking = enable_accelerated_networking
+ self.network_security_group = network_security_group
+ self.dns_settings = dns_settings
+ self.ip_configurations = ip_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile.py
index 2e7d2e9d4663..f454544145ca 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetUpdateNetworkProfile(Model):
'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'},
}
- def __init__(self, network_interface_configurations=None):
- super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__()
- self.network_interface_configurations = network_interface_configurations
+ 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/v2017_03_30/models/virtual_machine_scale_set_update_network_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_network_profile_py3.py
new file mode 100644
index 000000000000..ac421c4a18d7
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkConfiguration]
+ """
+
+ _attribute_map = {
+ 'network_interface_configurations': {'key': 'networkInterfaceConfigurations', 'type': '[VirtualMachineScaleSetUpdateNetworkConfiguration]'},
+ }
+
+ def __init__(self, *, network_interface_configurations=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdateNetworkProfile, self).__init__(**kwargs)
+ self.network_interface_configurations = network_interface_configurations
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py
index 26f403f7985d..cdc8991bda95 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py
@@ -37,9 +37,9 @@ class VirtualMachineScaleSetUpdateOSDisk(Model):
'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
}
- def __init__(self, caching=None, image=None, vhd_containers=None, managed_disk=None):
- super(VirtualMachineScaleSetUpdateOSDisk, self).__init__()
- self.caching = caching
- self.image = image
- self.vhd_containers = vhd_containers
- self.managed_disk = managed_disk
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs)
+ self.caching = kwargs.get('caching', None)
+ self.image = kwargs.get('image', None)
+ self.vhd_containers = kwargs.get('vhd_containers', None)
+ self.managed_disk = kwargs.get('managed_disk', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk_py3.py
new file mode 100644
index 000000000000..3357b7c3aedb
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk_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 VirtualMachineScaleSetUpdateOSDisk(Model):
+ """Describes virtual machine scale set operating system disk Update Object.
+ This should be used for Updating VMSS OS Disk.
+
+ :param caching: The caching type. Possible values include: 'None',
+ 'ReadOnly', 'ReadWrite'
+ :type caching: str or ~azure.mgmt.compute.v2017_03_30.models.CachingTypes
+ :param image: The Source User Image VirtualHardDisk. This VirtualHardDisk
+ will be copied before using it to attach to the Virtual Machine. If
+ SourceImage is provided, the destination VirtualHardDisk should not exist.
+ :type image: ~azure.mgmt.compute.v2017_03_30.models.VirtualHardDisk
+ :param vhd_containers: The list of virtual hard disk container uris.
+ :type vhd_containers: list[str]
+ :param managed_disk: The managed disk parameters.
+ :type managed_disk:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetManagedDiskParameters
+ """
+
+ _attribute_map = {
+ 'caching': {'key': 'caching', 'type': 'CachingTypes'},
+ 'image': {'key': 'image', 'type': 'VirtualHardDisk'},
+ 'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
+ 'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
+ }
+
+ def __init__(self, *, caching=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdateOSDisk, self).__init__(**kwargs)
+ self.caching = caching
+ self.image = image
+ self.vhd_containers = vhd_containers
+ self.managed_disk = managed_disk
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile.py
index c537bb406a04..2a450b7a5743 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile.py
@@ -35,9 +35,9 @@ class VirtualMachineScaleSetUpdateOSProfile(Model):
'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
}
- def __init__(self, custom_data=None, windows_configuration=None, linux_configuration=None, secrets=None):
- super(VirtualMachineScaleSetUpdateOSProfile, self).__init__()
- self.custom_data = custom_data
- self.windows_configuration = windows_configuration
- self.linux_configuration = linux_configuration
- self.secrets = secrets
+ 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/v2017_03_30/models/virtual_machine_scale_set_update_os_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_profile_py3.py
new file mode 100644
index 000000000000..18b1e26f7176
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.WindowsConfiguration
+ :param linux_configuration: The Linux Configuration of the OS profile.
+ :type linux_configuration:
+ ~azure.mgmt.compute.v2017_03_30.models.LinuxConfiguration
+ :param secrets: The List of certificates for addition to the VM.
+ :type secrets:
+ list[~azure.mgmt.compute.v2017_03_30.models.VaultSecretGroup]
+ """
+
+ _attribute_map = {
+ 'custom_data': {'key': 'customData', 'type': 'str'},
+ 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'},
+ 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'LinuxConfiguration'},
+ 'secrets': {'key': 'secrets', 'type': '[VaultSecretGroup]'},
+ }
+
+ def __init__(self, *, custom_data: str=None, windows_configuration=None, linux_configuration=None, secrets=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdateOSProfile, self).__init__(**kwargs)
+ self.custom_data = custom_data
+ self.windows_configuration = windows_configuration
+ self.linux_configuration = linux_configuration
+ self.secrets = secrets
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration.py
index 01f93444a77a..225b662d4296 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration.py
@@ -32,8 +32,8 @@ class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(Model):
'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'},
}
- def __init__(self, name=None, idle_timeout_in_minutes=None, dns_settings=None):
- super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__()
- self.name = name
- self.idle_timeout_in_minutes = idle_timeout_in_minutes
- self.dns_settings = dns_settings
+ 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/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_public_ip_address_configuration_py3.py
new file mode 100644
index 000000000000..0c6bc55ac163
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'},
+ 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'},
+ }
+
+ def __init__(self, *, name: str=None, idle_timeout_in_minutes: int=None, dns_settings=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, self).__init__(**kwargs)
+ self.name = name
+ self.idle_timeout_in_minutes = idle_timeout_in_minutes
+ self.dns_settings = dns_settings
diff --git a/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
new file mode 100644
index 000000000000..c27c33be47de
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import UpdateResource
+
+
+class VirtualMachineScaleSetUpdate(UpdateResource):
+ """Describes a Virtual Machine Scale Set.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param sku: The virtual machine scale set sku.
+ :type sku: ~azure.mgmt.compute.v2017_03_30.models.Sku
+ :param plan: The purchase plan when deploying a virtual machine scale set
+ from VM Marketplace images.
+ :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan
+ :param upgrade_policy: The upgrade policy.
+ :type upgrade_policy: ~azure.mgmt.compute.v2017_03_30.models.UpgradePolicy
+ :param virtual_machine_profile: The virtual machine profile.
+ :type virtual_machine_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateVMProfile
+ :param overprovision: Specifies whether the Virtual Machine Scale Set
+ should be overprovisioned.
+ :type overprovision: bool
+ :param single_placement_group: When true this limits the scale set to a
+ single placement group, of max size 100 virtual machines.
+ :type single_placement_group: bool
+ :param identity: The identity of the virtual machine scale set, if
+ configured.
+ :type identity:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetIdentity
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'plan': {'key': 'plan', 'type': 'Plan'},
+ 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'},
+ 'virtual_machine_profile': {'key': 'properties.virtualMachineProfile', 'type': 'VirtualMachineScaleSetUpdateVMProfile'},
+ 'overprovision': {'key': 'properties.overprovision', 'type': 'bool'},
+ 'single_placement_group': {'key': 'properties.singlePlacementGroup', 'type': 'bool'},
+ 'identity': {'key': 'identity', 'type': 'VirtualMachineScaleSetIdentity'},
+ }
+
+ def __init__(self, *, tags=None, sku=None, plan=None, upgrade_policy=None, virtual_machine_profile=None, overprovision: bool=None, single_placement_group: bool=None, identity=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdate, self).__init__(tags=tags, **kwargs)
+ self.sku = sku
+ self.plan = plan
+ self.upgrade_policy = upgrade_policy
+ self.virtual_machine_profile = virtual_machine_profile
+ self.overprovision = overprovision
+ self.single_placement_group = single_placement_group
+ self.identity = identity
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile.py
index 130137d04cc1..68723e6f8c26 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile.py
@@ -32,8 +32,8 @@ class VirtualMachineScaleSetUpdateStorageProfile(Model):
'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'},
}
- def __init__(self, image_reference=None, os_disk=None, data_disks=None):
- super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__()
- self.image_reference = image_reference
- self.os_disk = os_disk
- self.data_disks = data_disks
+ 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/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_storage_profile_py3.py
new file mode 100644
index 000000000000..10e544fa8ff5
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.ImageReference
+ :param os_disk: The OS disk.
+ :type os_disk:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateOSDisk
+ :param data_disks: The data disks.
+ :type data_disks:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetDataDisk]
+ """
+
+ _attribute_map = {
+ 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'},
+ 'os_disk': {'key': 'osDisk', 'type': 'VirtualMachineScaleSetUpdateOSDisk'},
+ 'data_disks': {'key': 'dataDisks', 'type': '[VirtualMachineScaleSetDataDisk]'},
+ }
+
+ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdateStorageProfile, self).__init__(**kwargs)
+ self.image_reference = image_reference
+ self.os_disk = os_disk
+ self.data_disks = data_disks
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile.py
index e50bd9f076fd..769e70ebc7b4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile.py
@@ -45,11 +45,11 @@ class VirtualMachineScaleSetUpdateVMProfile(Model):
'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=None):
- super(VirtualMachineScaleSetUpdateVMProfile, self).__init__()
- 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
+ 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/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_vm_profile_py3.py
new file mode 100644
index 000000000000..7af111bbdb5e
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineScaleSetUpdateOSProfile
+ :param storage_profile: The virtual machine scale set storage profile.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateStorageProfile
+ :param network_profile: The virtual machine scale set network profile.
+ :type network_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetUpdateNetworkProfile
+ :param diagnostics_profile: The virtual machine scale set diagnostics
+ profile.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile
+ :param extension_profile: The virtual machine scale set extension profile.
+ :type extension_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile
+ :param license_type: The license type, which is for bring your own license
+ scenario.
+ :type license_type: str
+ """
+
+ _attribute_map = {
+ 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetUpdateOSProfile'},
+ 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetUpdateStorageProfile'},
+ 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetUpdateNetworkProfile'},
+ 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'},
+ 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
+ 'license_type': {'key': 'licenseType', 'type': 'str'},
+ }
+
+ def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetUpdateVMProfile, self).__init__(**kwargs)
+ self.os_profile = os_profile
+ self.storage_profile = storage_profile
+ self.network_profile = network_profile
+ self.diagnostics_profile = diagnostics_profile
+ self.extension_profile = extension_profile
+ self.license_type = license_type
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm.py
index 8e04ba611f6c..8a36a7dff817 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm.py
@@ -18,13 +18,15 @@ class VirtualMachineScaleSetVM(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
+ All required parameters must be populated in order to send to Azure.
+
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
- :param location: Resource location
+ :param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
@@ -134,20 +136,20 @@ class VirtualMachineScaleSetVM(Resource):
'resources': {'key': 'resources', 'type': '[VirtualMachineExtension]'},
}
- def __init__(self, location, tags=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, diagnostics_profile=None, availability_set=None, license_type=None, plan=None):
- super(VirtualMachineScaleSetVM, self).__init__(location=location, tags=tags)
+ 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 = 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.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 = license_type
- self.plan = plan
+ 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/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py
index 4140f1648fb3..e0010d843bff 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary.py
@@ -35,7 +35,7 @@ class VirtualMachineScaleSetVMExtensionsSummary(Model):
'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
}
- def __init__(self):
- super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__()
+ 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/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_extensions_summary_py3.py
new file mode 100644
index 000000000000..df6fe0e1d5f6
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.VirtualMachineStatusCodeCount]
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'statuses_summary': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMachineStatusCodeCount]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMExtensionsSummary, self).__init__(**kwargs)
+ self.name = None
+ self.statuses_summary = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids.py
index 681ab449f3f2..772c66dad326 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids.py
@@ -25,6 +25,6 @@ class VirtualMachineScaleSetVMInstanceIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids=None):
- super(VirtualMachineScaleSetVMInstanceIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2017_03_30/models/virtual_machine_scale_set_vm_instance_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/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/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py
index 2a35798001fa..ece250dd4fd4 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids.py
@@ -15,7 +15,9 @@
class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
"""Specifies a list of virtual machine instance IDs from the VM scale set.
- :param instance_ids: The virtual machine scale set instance ids.
+ 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]
"""
@@ -27,6 +29,6 @@ class VirtualMachineScaleSetVMInstanceRequiredIDs(Model):
'instance_ids': {'key': 'instanceIds', 'type': '[str]'},
}
- def __init__(self, instance_ids):
- super(VirtualMachineScaleSetVMInstanceRequiredIDs, self).__init__()
- self.instance_ids = instance_ids
+ 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/v2017_03_30/models/virtual_machine_scale_set_vm_instance_required_ids_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/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/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view.py
index fb7ef5159883..489f4fe28548 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view.py
@@ -67,15 +67,15 @@ class VirtualMachineScaleSetVMInstanceView(Model):
'placement_group_id': {'key': 'placementGroupId', 'type': 'str'},
}
- def __init__(self, platform_update_domain=None, platform_fault_domain=None, rdp_thumb_print=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id=None):
- super(VirtualMachineScaleSetVMInstanceView, self).__init__()
- self.platform_update_domain = platform_update_domain
- self.platform_fault_domain = platform_fault_domain
- self.rdp_thumb_print = rdp_thumb_print
- self.vm_agent = vm_agent
- self.disks = disks
- self.extensions = extensions
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = kwargs.get('platform_update_domain', None)
+ self.platform_fault_domain = kwargs.get('platform_fault_domain', None)
+ self.rdp_thumb_print = kwargs.get('rdp_thumb_print', None)
+ self.vm_agent = kwargs.get('vm_agent', None)
+ self.disks = kwargs.get('disks', None)
+ self.extensions = kwargs.get('extensions', None)
self.vm_health = None
- self.boot_diagnostics = boot_diagnostics
- self.statuses = statuses
- self.placement_group_id = placement_group_id
+ 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/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view_py3.py
new file mode 100644
index 000000000000..25821e5bfe74
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_instance_view_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 msrest.serialization import Model
+
+
+class VirtualMachineScaleSetVMInstanceView(Model):
+ """The instance view of a virtual machine scale set VM.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param platform_update_domain: The Update Domain count.
+ :type platform_update_domain: int
+ :param platform_fault_domain: The Fault Domain count.
+ :type platform_fault_domain: int
+ :param rdp_thumb_print: The Remote desktop certificate thumbprint.
+ :type rdp_thumb_print: str
+ :param vm_agent: The VM Agent running on the virtual machine.
+ :type vm_agent:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineAgentInstanceView
+ :param disks: The disks information.
+ :type disks: list[~azure.mgmt.compute.v2017_03_30.models.DiskInstanceView]
+ :param extensions: The extensions information.
+ :type extensions:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionInstanceView]
+ :ivar vm_health: The health status for the VM.
+ :vartype vm_health:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineHealthStatus
+ :param boot_diagnostics: Boot Diagnostics is a debugging feature which
+ allows you to view Console Output and Screenshot to diagnose VM status.
+
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.v2017_03_30.models.BootDiagnosticsInstanceView
+ :param statuses: The resource status information.
+ :type statuses:
+ list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus]
+ :param placement_group_id: The placement group in which the VM is running.
+ If the VM is deallocated it will not have a placementGroupId.
+ :type placement_group_id: str
+ """
+
+ _validation = {
+ 'vm_health': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'int'},
+ 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'int'},
+ 'rdp_thumb_print': {'key': 'rdpThumbPrint', 'type': 'str'},
+ 'vm_agent': {'key': 'vmAgent', 'type': 'VirtualMachineAgentInstanceView'},
+ 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'},
+ 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'},
+ 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'},
+ 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'},
+ 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
+ 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'},
+ }
+
+ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, rdp_thumb_print: str=None, vm_agent=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, placement_group_id: str=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMInstanceView, self).__init__(**kwargs)
+ self.platform_update_domain = platform_update_domain
+ self.platform_fault_domain = platform_fault_domain
+ self.rdp_thumb_print = rdp_thumb_print
+ self.vm_agent = vm_agent
+ self.disks = disks
+ self.extensions = extensions
+ self.vm_health = None
+ self.boot_diagnostics = boot_diagnostics
+ self.statuses = statuses
+ self.placement_group_id = placement_group_id
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile.py
index 30bd0d1f1345..f874d2898304 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile.py
@@ -56,11 +56,11 @@ class VirtualMachineScaleSetVMProfile(Model):
'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=None):
- super(VirtualMachineScaleSetVMProfile, self).__init__()
- 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
+ def __init__(self, **kwargs):
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = kwargs.get('os_profile', None)
+ self.storage_profile = kwargs.get('storage_profile', None)
+ self.network_profile = kwargs.get('network_profile', None)
+ self.diagnostics_profile = kwargs.get('diagnostics_profile', None)
+ self.extension_profile = kwargs.get('extension_profile', None)
+ self.license_type = kwargs.get('license_type', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile_py3.py
new file mode 100644
index 000000000000..8c58976e2670
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_vm_profile_py3.py
@@ -0,0 +1,66 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class VirtualMachineScaleSetVMProfile(Model):
+ """Describes a virtual machine scale set virtual machine profile.
+
+ :param os_profile: Specifies the operating system settings for the virtual
+ machines in the scale set.
+ :type os_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetOSProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetStorageProfile
+ :param network_profile: Specifies properties of the network interfaces of
+ the virtual machines in the scale set.
+ :type network_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetNetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile
+ :param extension_profile: Specifies a collection of settings for
+ extensions installed on virtual machines in the scale set.
+ :type extension_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtensionProfile
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ """
+
+ _attribute_map = {
+ 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'},
+ 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'},
+ 'network_profile': {'key': 'networkProfile', 'type': 'VirtualMachineScaleSetNetworkProfile'},
+ 'diagnostics_profile': {'key': 'diagnosticsProfile', 'type': 'DiagnosticsProfile'},
+ 'extension_profile': {'key': 'extensionProfile', 'type': 'VirtualMachineScaleSetExtensionProfile'},
+ 'license_type': {'key': 'licenseType', 'type': 'str'},
+ }
+
+ def __init__(self, *, os_profile=None, storage_profile=None, network_profile=None, diagnostics_profile=None, extension_profile=None, license_type: str=None, **kwargs) -> None:
+ super(VirtualMachineScaleSetVMProfile, self).__init__(**kwargs)
+ self.os_profile = os_profile
+ self.storage_profile = storage_profile
+ self.network_profile = network_profile
+ self.diagnostics_profile = diagnostics_profile
+ self.extension_profile = extension_profile
+ self.license_type = license_type
diff --git a/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
new file mode 100644
index 000000000000..ee6d74113a2b
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 import Resource
+
+
+class VirtualMachineScaleSetVM(Resource):
+ """Describes a virtual machine scale set virtual machine.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Resource Id
+ :vartype id: str
+ :ivar name: Resource name
+ :vartype name: str
+ :ivar type: Resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar instance_id: The virtual machine instance ID.
+ :vartype instance_id: str
+ :ivar sku: The virtual machine SKU.
+ :vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku
+ :ivar latest_model_applied: Specifies whether the latest model has been
+ applied to the virtual machine.
+ :vartype latest_model_applied: bool
+ :ivar vm_id: Azure VM unique ID.
+ :vartype vm_id: str
+ :ivar instance_view: The virtual machine instance view.
+ :vartype instance_view:
+ ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView
+ :param hardware_profile: Specifies the hardware settings for the virtual
+ machine.
+ :type hardware_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.HardwareProfile
+ :param storage_profile: Specifies the storage settings for the virtual
+ machine disks.
+ :type storage_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.StorageProfile
+ :param os_profile: Specifies the operating system settings for the virtual
+ machine.
+ :type os_profile: ~azure.mgmt.compute.v2017_03_30.models.OSProfile
+ :param network_profile: Specifies the network interfaces of the virtual
+ machine.
+ :type network_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.NetworkProfile
+ :param diagnostics_profile: Specifies the boot diagnostic settings state.
+
Minimum api-version: 2015-06-15.
+ :type diagnostics_profile:
+ ~azure.mgmt.compute.v2017_03_30.models.DiagnosticsProfile
+ :param availability_set: Specifies information about the availability set
+ that the virtual machine should be assigned to. Virtual machines specified
+ in the same availability set are allocated to different nodes to maximize
+ availability. For more information about availability sets, see [Manage
+ the availability of virtual
+ machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+
For more information on Azure planned 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.v2017_03_30.models.SubResource
+ :ivar provisioning_state: The provisioning state, which only appears in
+ the response.
+ :vartype provisioning_state: str
+ :param license_type: Specifies that the image or disk that is being used
+ was licensed on-premises. This element is only used for images that
+ contain the Windows Server operating system.
Possible values are:
+
Windows_Client
Windows_Server
If this element
+ is included in a request for an update, the value must match the initial
+ value. This value cannot be updated.
For more information, see
+ [Azure Hybrid Use Benefit for Windows
+ Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+
Minimum api-version: 2015-06-15
+ :type license_type: str
+ :param plan: Specifies information about the marketplace image used to
+ create the virtual machine. This element is only used for marketplace
+ images. Before you can use a marketplace image from an API, you must
+ enable the image for programmatic use. In the Azure portal, find the
+ marketplace image that you want to use and then click **Want to deploy
+ programmatically, Get Started ->**. Enter any required information and
+ then click **Save**.
+ :type plan: ~azure.mgmt.compute.v2017_03_30.models.Plan
+ :ivar resources: The virtual machine child extension resources.
+ :vartype resources:
+ list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'instance_id': {'readonly': True},
+ 'sku': {'readonly': True},
+ 'latest_model_applied': {'readonly': True},
+ 'vm_id': {'readonly': True},
+ 'instance_view': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'instance_id': {'key': 'instanceId', 'type': 'str'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'latest_model_applied': {'key': 'properties.latestModelApplied', 'type': 'bool'},
+ 'vm_id': {'key': 'properties.vmId', 'type': 'str'},
+ 'instance_view': {'key': 'properties.instanceView', 'type': '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/v2017_03_30/models/virtual_machine_size.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size.py
index 3f4fa7f06b70..0fef3efd6c8e 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size.py
@@ -43,11 +43,11 @@ class VirtualMachineSize(Model):
'max_data_disk_count': {'key': 'maxDataDiskCount', 'type': 'int'},
}
- def __init__(self, name=None, number_of_cores=None, os_disk_size_in_mb=None, resource_disk_size_in_mb=None, memory_in_mb=None, max_data_disk_count=None):
- super(VirtualMachineSize, self).__init__()
- 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
+ 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/v2017_03_30/models/virtual_machine_size_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_size_py3.py
new file mode 100644
index 000000000000..9f99ba20ce42
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/virtual_machine_status_code_count.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count.py
index 177515706064..7df7b702acd7 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count.py
@@ -35,7 +35,7 @@ class VirtualMachineStatusCodeCount(Model):
'count': {'key': 'count', 'type': 'int'},
}
- def __init__(self):
- super(VirtualMachineStatusCodeCount, self).__init__()
+ def __init__(self, **kwargs):
+ super(VirtualMachineStatusCodeCount, self).__init__(**kwargs)
self.code = None
self.count = None
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_status_code_count_py3.py
new file mode 100644
index 000000000000..c38800073a95
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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/v2017_03_30/models/win_rm_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration.py
index 78661815d694..d50cf4086203 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration.py
@@ -24,6 +24,6 @@ class WinRMConfiguration(Model):
'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
}
- def __init__(self, listeners=None):
- super(WinRMConfiguration, self).__init__()
- self.listeners = listeners
+ def __init__(self, **kwargs):
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = kwargs.get('listeners', None)
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_configuration_py3.py
new file mode 100644
index 000000000000..01f177397f32
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.WinRMListener]
+ """
+
+ _attribute_map = {
+ 'listeners': {'key': 'listeners', 'type': '[WinRMListener]'},
+ }
+
+ def __init__(self, *, listeners=None, **kwargs) -> None:
+ super(WinRMConfiguration, self).__init__(**kwargs)
+ self.listeners = listeners
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py
index d1e9fd98655e..6810cc597f00 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py
@@ -36,7 +36,7 @@ class WinRMListener(Model):
'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
}
- def __init__(self, protocol=None, certificate_url=None):
- super(WinRMListener, self).__init__()
- self.protocol = protocol
- self.certificate_url = certificate_url
+ 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/v2017_03_30/models/win_rm_listener_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener_py3.py
new file mode 100644
index 000000000000..dcd585dcf57f
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.ProtocolTypes
+ :param certificate_url: This is the URL of a certificate that has been
+ uploaded to Key Vault as a secret. For adding a secret to the Key Vault,
+ see [Add a key or secret to the key
+ vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).
+ In this case, your certificate needs to be It is the Base64 encoding of
+ the following JSON Object which is encoded in UTF-8:
{
+ "data":"",
"dataType":"pfx",
+ "password":""
}
+ :type certificate_url: str
+ """
+
+ _attribute_map = {
+ 'protocol': {'key': 'protocol', 'type': 'ProtocolTypes'},
+ 'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
+ }
+
+ def __init__(self, *, protocol=None, certificate_url: str=None, **kwargs) -> None:
+ super(WinRMListener, self).__init__(**kwargs)
+ self.protocol = protocol
+ self.certificate_url = certificate_url
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration.py
index bd6efdc3890c..7c0655f326cb 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration.py
@@ -45,10 +45,10 @@ class WindowsConfiguration(Model):
'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
}
- def __init__(self, provision_vm_agent=None, enable_automatic_updates=None, time_zone=None, additional_unattend_content=None, win_rm=None):
- super(WindowsConfiguration, self).__init__()
- 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
+ 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/v2017_03_30/models/windows_configuration_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/windows_configuration_py3.py
new file mode 100644
index 000000000000..b2dd2acef034
--- /dev/null
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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.v2017_03_30.models.AdditionalUnattendContent]
+ :param win_rm: Specifies the Windows Remote Management listeners. This
+ enables remote Windows PowerShell.
+ :type win_rm: ~azure.mgmt.compute.v2017_03_30.models.WinRMConfiguration
+ """
+
+ _attribute_map = {
+ 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'},
+ 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'},
+ 'time_zone': {'key': 'timeZone', 'type': 'str'},
+ 'additional_unattend_content': {'key': 'additionalUnattendContent', 'type': '[AdditionalUnattendContent]'},
+ 'win_rm': {'key': 'winRM', 'type': 'WinRMConfiguration'},
+ }
+
+ def __init__(self, *, provision_vm_agent: bool=None, enable_automatic_updates: bool=None, time_zone: str=None, additional_unattend_content=None, win_rm=None, **kwargs) -> None:
+ super(WindowsConfiguration, self).__init__(**kwargs)
+ self.provision_vm_agent = provision_vm_agent
+ self.enable_automatic_updates = enable_automatic_updates
+ self.time_zone = time_zone
+ self.additional_unattend_content = additional_unattend_content
+ self.win_rm = win_rm
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/disks_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/disks_operations.py
index 2bda0856000e..c2b0c8aabe46 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/disks_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/disks_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates or updates a disk.
:param resource_group_name: The name of the resource group.
@@ -106,13 +106,16 @@ def create_or_update(
operation.
:type disk: ~azure.mgmt.compute.v2017_03_30.models.Disk
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Disk or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Disk or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Disk]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Disk]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -123,30 +126,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Disk', response)
if raw:
@@ -155,12 +136,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'}
@@ -216,7 +198,7 @@ def _update_initial(
return deserialized
def update(
- self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config):
"""Updates (patches) a disk.
:param resource_group_name: The name of the resource group.
@@ -230,13 +212,16 @@ def update(
operation.
:type disk: ~azure.mgmt.compute.v2017_03_30.models.DiskUpdate
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Disk or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Disk or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Disk]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Disk]]
:raises: :class:`CloudError`
"""
raw_result = self._update_initial(
@@ -247,30 +232,8 @@ def update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Disk', response)
if raw:
@@ -279,12 +242,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'}
def get(
@@ -399,7 +363,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Deletes a disk.
:param resource_group_name: The name of the resource group.
@@ -410,13 +374,16 @@ def delete(
length is 80 characters.
:type disk_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -426,30 +393,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -458,12 +403,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'}
def list_by_resource_group(
@@ -652,7 +598,7 @@ def _grant_access_initial(
return deserialized
def grant_access(
- self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config):
"""Grants access to a disk.
:param resource_group_name: The name of the resource group.
@@ -669,13 +615,16 @@ def grant_access(
access expires.
:type duration_in_seconds: int
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns AccessUri or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns AccessUri or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.AccessUri]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.AccessUri]]
:raises: :class:`CloudError`
"""
raw_result = self._grant_access_initial(
@@ -687,30 +636,8 @@ def grant_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('AccessUri', response)
if raw:
@@ -719,12 +646,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'}
@@ -774,7 +702,7 @@ def _revoke_access_initial(
return deserialized
def revoke_access(
- self, resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Revokes access to a disk.
:param resource_group_name: The name of the resource group.
@@ -785,13 +713,16 @@ def revoke_access(
length is 80 characters.
:type disk_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._revoke_access_initial(
@@ -801,30 +732,8 @@ def revoke_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -833,10 +742,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/images_operations.py
index e792d744d074..684b505f7197 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/images_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/images_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, image_name, parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -102,13 +102,16 @@ def create_or_update(
:param parameters: Parameters supplied to the Create Image operation.
:type parameters: ~azure.mgmt.compute.v2017_03_30.models.Image
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Image or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Image or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Image]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Image]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -119,30 +122,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Image', response)
if raw:
@@ -151,12 +132,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -206,7 +188,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, image_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -214,13 +196,16 @@ def delete(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -230,30 +215,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -262,12 +225,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/snapshots_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/snapshots_operations.py
index e352ed6fd063..9c209cb1ac47 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/snapshots_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/snapshots_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -92,7 +92,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates or updates a snapshot.
:param resource_group_name: The name of the resource group.
@@ -106,13 +106,16 @@ def create_or_update(
operation.
:type snapshot: ~azure.mgmt.compute.v2017_03_30.models.Snapshot
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Snapshot or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Snapshot or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Snapshot]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Snapshot]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -123,30 +126,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Snapshot', response)
if raw:
@@ -155,12 +136,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'}
@@ -216,7 +198,7 @@ def _update_initial(
return deserialized
def update(
- self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config):
"""Updates (patches) a snapshot.
:param resource_group_name: The name of the resource group.
@@ -230,13 +212,16 @@ def update(
snapshot operation.
:type snapshot: ~azure.mgmt.compute.v2017_03_30.models.SnapshotUpdate
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns Snapshot or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns Snapshot or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.Snapshot]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.Snapshot]]
:raises: :class:`CloudError`
"""
raw_result = self._update_initial(
@@ -247,30 +232,8 @@ def update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('Snapshot', response)
if raw:
@@ -279,12 +242,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'}
def get(
@@ -399,7 +363,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Deletes a snapshot.
:param resource_group_name: The name of the resource group.
@@ -410,13 +374,16 @@ def delete(
is 80 characters.
:type snapshot_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -426,30 +393,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -458,12 +403,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'}
def list_by_resource_group(
@@ -652,7 +598,7 @@ def _grant_access_initial(
return deserialized
def grant_access(
- self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config):
"""Grants access to a snapshot.
:param resource_group_name: The name of the resource group.
@@ -669,13 +615,16 @@ def grant_access(
access expires.
:type duration_in_seconds: int
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns AccessUri or
- ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns AccessUri or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.AccessUri]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.AccessUri]]
:raises: :class:`CloudError`
"""
raw_result = self._grant_access_initial(
@@ -687,30 +636,8 @@ def grant_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('AccessUri', response)
if raw:
@@ -719,12 +646,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'}
@@ -774,7 +702,7 @@ def _revoke_access_initial(
return deserialized
def revoke_access(
- self, resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config):
+ self, resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Revokes access to a snapshot.
:param resource_group_name: The name of the resource group.
@@ -785,13 +713,16 @@ def revoke_access(
is 80 characters.
:type snapshot_name: str
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._revoke_access_initial(
@@ -801,30 +732,8 @@ def revoke_access(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -833,10 +742,11 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'}
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extensions_operations.py
index 4180f3024fc7..f688392c7ed1 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extensions_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extensions_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -93,7 +93,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_name, vm_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -108,13 +108,16 @@ def create_or_update(
:type extension_parameters:
~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineExtension or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns VirtualMachineExtension
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -126,30 +129,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineExtension', response)
if raw:
@@ -158,12 +139,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -214,7 +196,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_name, vm_extension_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +207,16 @@ def delete(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -242,30 +227,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -274,12 +237,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_extensions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_extensions_operations.py
index 34dd93622d99..737744d28691 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_extensions_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_extensions_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -93,7 +93,7 @@ def _create_or_update_initial(
return deserialized
def create_or_update(
- self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -108,13 +108,17 @@ def create_or_update(
:type extension_parameters:
~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension
:param dict custom_headers: headers that will be added to the request
- :param bool raw: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- VirtualMachineScaleSetExtension or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns
+ VirtualMachineScaleSetExtension or
+ ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension]]
:raises: :class:`CloudError`
"""
raw_result = self._create_or_update_initial(
@@ -126,30 +130,8 @@ def create_or_update(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 201]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('VirtualMachineScaleSetExtension', response)
if raw:
@@ -158,12 +140,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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}'}
@@ -214,7 +197,7 @@ def _delete_initial(
return deserialized
def delete(
- self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -225,13 +208,16 @@ def delete(
: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: returns the direct response alongside the
- deserialized response
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._delete_initial(
@@ -242,30 +228,8 @@ def delete(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202, 204]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -274,12 +238,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_rolling_upgrades_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_rolling_upgrades_operations.py
index 4afc6b766f95..510c2e37faff 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_rolling_upgrades_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_rolling_upgrades_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -86,7 +86,7 @@ def _cancel_initial(
return deserialized
def cancel(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -94,13 +94,16 @@ def cancel(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._cancel_initial(
@@ -110,30 +113,8 @@ def cancel(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -142,12 +123,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -197,7 +179,7 @@ def _start_os_upgrade_initial(
return deserialized
def start_os_upgrade(
- self, resource_group_name, vm_scale_set_name, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -208,13 +190,16 @@ def start_os_upgrade(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._start_os_upgrade_initial(
@@ -224,30 +209,8 @@ def start_os_upgrade(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -256,12 +219,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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(
diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py
index ae2ed643847c..121b1a331375 100644
--- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py
+++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_scale_set_vms_operations.py
@@ -12,8 +12,8 @@
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
-from msrest.exceptions import DeserializationError
-from msrestazure.azure_operation import AzureOperationPoller
+from msrest.polling import LROPoller, NoPolling
+from msrestazure.polling.arm_polling import ARMPolling
from .. import models
@@ -87,7 +87,7 @@ def _reimage_initial(
return deserialized
def reimage(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -98,13 +98,16 @@ def reimage(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_initial(
@@ -115,30 +118,8 @@ def reimage(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -147,12 +128,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -203,7 +185,7 @@ def _reimage_all_initial(
return deserialized
def reimage_all(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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.
@@ -215,13 +197,16 @@ def reimage_all(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError`
"""
raw_result = self._reimage_all_initial(
@@ -232,30 +217,8 @@ def reimage_all(
raw=True,
**operation_config
)
- if raw:
- return raw_result
-
- # Construct and send request
- def long_running_send():
- return raw_result.response
-
- def get_long_running_status(status_link, headers=None):
-
- request = self._client.get(status_link)
- if headers:
- request.headers.update(headers)
- header_parameters = {}
- header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
- return self._client.send(
- request, header_parameters, stream=False, **operation_config)
def get_long_running_output(response):
-
- if response.status_code not in [200, 202]:
- exp = CloudError(response)
- exp.request_id = response.headers.get('x-ms-request-id')
- raise exp
-
deserialized = self._deserialize('OperationStatusResponse', response)
if raw:
@@ -264,12 +227,13 @@ def get_long_running_output(response):
return deserialized
- long_running_operation_timeout = operation_config.get(
+ lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
- return AzureOperationPoller(
- long_running_send, get_long_running_output,
- get_long_running_status, long_running_operation_timeout)
+ if polling is True: polling_method = ARMPolling(lro_delay, **operation_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'}
@@ -320,7 +284,7 @@ def _deallocate_initial(
return deserialized
def deallocate(
- self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, **operation_config):
+ 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
@@ -333,13 +297,16 @@ def deallocate(
: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
- :return: An instance of AzureOperationPoller that returns
- OperationStatusResponse or ClientRawResponse if raw=true
+ :param bool raw: The poller return type is ClientRawResponse, the
+ direct response alongside the deserialized response
+ :param polling: True for ARMPolling, False for no polling, or a
+ polling object for personal polling strategy
+ :return: An instance of LROPoller that returns OperationStatusResponse
+ or ClientRawResponse if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]
- or ~msrest.pipeline.ClientRawResponse
+ or
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse]]
:raises: :class:`CloudError