diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py index 9e4583068493..4cf5e17b2d24 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py @@ -20,6 +20,7 @@ from ._models_py3 import AutomaticRepairsPolicy from ._models_py3 import AvailabilitySet from ._models_py3 import AvailabilitySetUpdate + from ._models_py3 import AvailablePatchSummary from ._models_py3 import BillingProfile from ._models_py3 import BootDiagnostics from ._models_py3 import BootDiagnosticsInstanceView @@ -53,6 +54,7 @@ from ._models_py3 import InstanceViewStatus from ._models_py3 import KeyVaultKeyReference from ._models_py3 import KeyVaultSecretReference + from ._models_py3 import LastPatchInstallationSummary from ._models_py3 import LinuxConfiguration from ._models_py3 import LogAnalyticsInputBase from ._models_py3 import LogAnalyticsOperationResult @@ -128,6 +130,7 @@ from ._models_py3 import VirtualMachineImage from ._models_py3 import VirtualMachineImageResource from ._models_py3 import VirtualMachineInstanceView + from ._models_py3 import VirtualMachinePatchStatus from ._models_py3 import VirtualMachineReimageParameters from ._models_py3 import VirtualMachineScaleSet from ._models_py3 import VirtualMachineScaleSetDataDisk @@ -189,6 +192,7 @@ from ._models import AutomaticRepairsPolicy from ._models import AvailabilitySet from ._models import AvailabilitySetUpdate + from ._models import AvailablePatchSummary from ._models import BillingProfile from ._models import BootDiagnostics from ._models import BootDiagnosticsInstanceView @@ -222,6 +226,7 @@ from ._models import InstanceViewStatus from ._models import KeyVaultKeyReference from ._models import KeyVaultSecretReference + from ._models import LastPatchInstallationSummary from ._models import LinuxConfiguration from ._models import LogAnalyticsInputBase from ._models import LogAnalyticsOperationResult @@ -297,6 +302,7 @@ from ._models import VirtualMachineImage from ._models import VirtualMachineImageResource from ._models import VirtualMachineInstanceView + from ._models import VirtualMachinePatchStatus from ._models import VirtualMachineReimageParameters from ._models import VirtualMachineScaleSet from ._models import VirtualMachineScaleSetDataDisk @@ -390,6 +396,7 @@ ResourceIdentityType, MaintenanceOperationResultCodeTypes, HyperVGenerationType, + RebootStatus, UpgradeMode, VirtualMachineScaleSetScaleInRules, OperatingSystemStateTypes, @@ -417,6 +424,7 @@ 'AutomaticRepairsPolicy', 'AvailabilitySet', 'AvailabilitySetUpdate', + 'AvailablePatchSummary', 'BillingProfile', 'BootDiagnostics', 'BootDiagnosticsInstanceView', @@ -450,6 +458,7 @@ 'InstanceViewStatus', 'KeyVaultKeyReference', 'KeyVaultSecretReference', + 'LastPatchInstallationSummary', 'LinuxConfiguration', 'LogAnalyticsInputBase', 'LogAnalyticsOperationResult', @@ -525,6 +534,7 @@ 'VirtualMachineImage', 'VirtualMachineImageResource', 'VirtualMachineInstanceView', + 'VirtualMachinePatchStatus', 'VirtualMachineReimageParameters', 'VirtualMachineScaleSet', 'VirtualMachineScaleSetDataDisk', @@ -617,6 +627,7 @@ 'ResourceIdentityType', 'MaintenanceOperationResultCodeTypes', 'HyperVGenerationType', + 'RebootStatus', 'UpgradeMode', 'VirtualMachineScaleSetScaleInRules', 'OperatingSystemStateTypes', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py index 43221c71ff12..d29fbdf55093 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py @@ -348,6 +348,15 @@ class HyperVGenerationType(str, Enum): v2 = "V2" +class RebootStatus(str, Enum): + + not_needed = "NotNeeded" + required = "Required" + started = "Started" + failed = "Failed" + completed = "Completed" + + class UpgradeMode(str, Enum): automatic = "Automatic" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py index f7c6a44da03b..efa163dc3795 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py @@ -419,6 +419,77 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) +class AvailablePatchSummary(Model): + """Describes the properties of an virtual machine instance view for available + patch summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The overall success or failure status of the operation. It + remains "InProgress" until the operation completes. At that point it will + become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values + include: 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' + :vartype status: str or + ~azure.mgmt.compute.v2020_06_01.models.PatchOperationStatus + :ivar assessment_activity_id: The activity ID of the operation that + produced this result. It is used to correlate across CRP and extension + logs. + :vartype assessment_activity_id: str + :ivar reboot_pending: The overall reboot status of the VM. It will be true + when partially installed patches require a reboot to complete installation + but the reboot has not yet occurred. + :vartype reboot_pending: bool + :ivar critical_and_security_patch_count: The number of critical or + security patches that have been detected as available and not yet + installed. + :vartype critical_and_security_patch_count: int + :ivar other_patch_count: The number of all available patches excluding + critical and security. + :vartype other_patch_count: int + :ivar start_time: The UTC timestamp when the operation began. + :vartype start_time: datetime + :ivar last_modified_time: The UTC timestamp when the operation began. + :vartype last_modified_time: datetime + :ivar error: The errors that were encountered during execution of the + operation. The details array contains the list of them. + :vartype error: ~azure.mgmt.compute.v2020_06_01.models.ApiError + """ + + _validation = { + 'status': {'readonly': True}, + 'assessment_activity_id': {'readonly': True}, + 'reboot_pending': {'readonly': True}, + 'critical_and_security_patch_count': {'readonly': True}, + 'other_patch_count': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'assessment_activity_id': {'key': 'assessmentActivityId', 'type': 'str'}, + 'reboot_pending': {'key': 'rebootPending', 'type': 'bool'}, + 'critical_and_security_patch_count': {'key': 'criticalAndSecurityPatchCount', 'type': 'int'}, + 'other_patch_count': {'key': 'otherPatchCount', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(AvailablePatchSummary, self).__init__(**kwargs) + self.status = None + self.assessment_activity_id = None + self.reboot_pending = None + self.critical_and_security_patch_count = None + self.other_patch_count = None + self.start_time = None + self.last_modified_time = None + self.error = None + + class BillingProfile(Model): """Specifies the billing related details of a Azure Spot VM or VMSS.

Minimum api-version: 2019-03-01. @@ -1875,6 +1946,110 @@ def __init__(self, **kwargs): self.source_vault = kwargs.get('source_vault', None) +class LastPatchInstallationSummary(Model): + """Describes the properties of the last installed patch summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The overall success or failure status of the operation. It + remains "InProgress" until the operation completes. At that point it will + become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values + include: 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' + :vartype status: str or + ~azure.mgmt.compute.v2020_06_01.models.PatchOperationStatus + :ivar installation_activity_id: The activity ID of the operation that + produced this result. It is used to correlate across CRP and extension + logs. + :vartype installation_activity_id: str + :ivar maintenance_window_exceeded: Describes whether the operation ran out + of time before it completed all its intended actions + :vartype maintenance_window_exceeded: bool + :ivar reboot_status: The reboot status of the machine after the patch + operation. It will be in "NotNeeded" status if reboot is not needed after + the patch operation. "Required" will be the status once the patch is + applied and machine is required to reboot. "Started" will be the reboot + status when the machine has started to reboot. "Failed" will be the status + if the machine is failed to reboot. "Completed" will be the status once + the machine is rebooted successfully. Possible values include: + 'NotNeeded', 'Required', 'Started', 'Failed', 'Completed' + :vartype reboot_status: str or + ~azure.mgmt.compute.v2020_06_01.models.RebootStatus + :ivar not_selected_patch_count: The number of all available patches but + not going to be installed because it didn't match a classification or + inclusion list entry. + :vartype not_selected_patch_count: int + :ivar excluded_patch_count: The number of all available patches but + excluded explicitly by a customer-specified exclusion list match. + :vartype excluded_patch_count: int + :ivar pending_patch_count: The number of all available patches expected to + be installed over the course of the patch installation operation. + :vartype pending_patch_count: int + :ivar installed_patch_count: The count of patches that successfully + installed. + :vartype installed_patch_count: int + :ivar failed_patch_count: The count of patches that failed installation. + :vartype failed_patch_count: int + :ivar start_time: The UTC timestamp when the operation began. + :vartype start_time: datetime + :ivar last_modified_time: The UTC timestamp when the operation began. + :vartype last_modified_time: datetime + :ivar started_by: The person or system account that started the operation + :vartype started_by: str + :ivar error: The errors that were encountered during execution of the + operation. The details array contains the list of them. + :vartype error: ~azure.mgmt.compute.v2020_06_01.models.ApiError + """ + + _validation = { + 'status': {'readonly': True}, + 'installation_activity_id': {'readonly': True}, + 'maintenance_window_exceeded': {'readonly': True}, + 'reboot_status': {'readonly': True}, + 'not_selected_patch_count': {'readonly': True}, + 'excluded_patch_count': {'readonly': True}, + 'pending_patch_count': {'readonly': True}, + 'installed_patch_count': {'readonly': True}, + 'failed_patch_count': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'started_by': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'installation_activity_id': {'key': 'installationActivityId', 'type': 'str'}, + 'maintenance_window_exceeded': {'key': 'maintenanceWindowExceeded', 'type': 'bool'}, + 'reboot_status': {'key': 'rebootStatus', 'type': 'str'}, + 'not_selected_patch_count': {'key': 'notSelectedPatchCount', 'type': 'int'}, + 'excluded_patch_count': {'key': 'excludedPatchCount', 'type': 'int'}, + 'pending_patch_count': {'key': 'pendingPatchCount', 'type': 'int'}, + 'installed_patch_count': {'key': 'installedPatchCount', 'type': 'int'}, + 'failed_patch_count': {'key': 'failedPatchCount', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'started_by': {'key': 'startedBy', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(LastPatchInstallationSummary, self).__init__(**kwargs) + self.status = None + self.installation_activity_id = None + self.maintenance_window_exceeded = None + self.reboot_status = None + self.not_selected_patch_count = None + self.excluded_patch_count = None + self.pending_patch_count = None + self.installed_patch_count = None + self.failed_patch_count = None + self.start_time = None + self.last_modified_time = None + self.started_by = None + self.error = None + + class LinuxConfiguration(Model): """Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on @@ -2419,7 +2594,7 @@ class PatchSettings(Model): automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by - the OS. The properties provisionVMAgent and + the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' :type patch_mode: str or @@ -4254,6 +4429,10 @@ class VirtualMachineExtension(Resource): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -4287,6 +4466,7 @@ class VirtualMachineExtension(Resource): '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'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -4300,6 +4480,7 @@ def __init__(self, **kwargs): 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.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) self.settings = kwargs.get('settings', None) self.protected_settings = kwargs.get('protected_settings', None) self.provisioning_state = None @@ -4472,6 +4653,10 @@ class VirtualMachineExtensionUpdate(UpdateResource): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -4487,6 +4672,7 @@ class VirtualMachineExtensionUpdate(UpdateResource): 'type': {'key': 'properties.type', 'type': 'str'}, 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, } @@ -4498,6 +4684,7 @@ def __init__(self, **kwargs): 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.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) self.settings = kwargs.get('settings', None) self.protected_settings = kwargs.get('protected_settings', None) @@ -4737,6 +4924,9 @@ class VirtualMachineInstanceView(Model): :param extensions: The extensions information. :type extensions: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineHealthStatus :param boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

@@ -4751,9 +4941,13 @@ class VirtualMachineInstanceView(Model): :param statuses: The resource status information. :type statuses: list[~azure.mgmt.compute.v2020_06_01.models.InstanceViewStatus] + :param patch_status: The status of virtual machine patch operations. + :type patch_status: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachinePatchStatus """ _validation = { + 'vm_health': {'readonly': True}, 'assigned_host': {'readonly': True}, } @@ -4769,9 +4963,11 @@ class VirtualMachineInstanceView(Model): 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, 'assigned_host': {'key': 'assignedHost', 'type': 'str'}, 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'patch_status': {'key': 'patchStatus', 'type': 'VirtualMachinePatchStatus'}, } def __init__(self, **kwargs): @@ -4787,9 +4983,35 @@ def __init__(self, **kwargs): self.maintenance_redeploy_status = kwargs.get('maintenance_redeploy_status', None) self.disks = kwargs.get('disks', None) self.extensions = kwargs.get('extensions', None) + self.vm_health = None self.boot_diagnostics = kwargs.get('boot_diagnostics', None) self.assigned_host = None self.statuses = kwargs.get('statuses', None) + self.patch_status = kwargs.get('patch_status', None) + + +class VirtualMachinePatchStatus(Model): + """The status of virtual machine patch operations. + + :param available_patch_summary: The available patch summary of the latest + assessment operation for the virtual machine. + :type available_patch_summary: + ~azure.mgmt.compute.v2020_06_01.models.AvailablePatchSummary + :param last_patch_installation_summary: The installation summary of the + latest installation operation for the virtual machine. + :type last_patch_installation_summary: + ~azure.mgmt.compute.v2020_06_01.models.LastPatchInstallationSummary + """ + + _attribute_map = { + 'available_patch_summary': {'key': 'availablePatchSummary', 'type': 'AvailablePatchSummary'}, + 'last_patch_installation_summary': {'key': 'lastPatchInstallationSummary', 'type': 'LastPatchInstallationSummary'}, + } + + def __init__(self, **kwargs): + super(VirtualMachinePatchStatus, self).__init__(**kwargs) + self.available_patch_summary = kwargs.get('available_patch_summary', None) + self.last_patch_installation_summary = kwargs.get('last_patch_installation_summary', None) class VirtualMachineReimageParameters(Model): @@ -5057,6 +5279,10 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -5086,6 +5312,7 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): 'type1': {'key': 'properties.type', 'type': 'str'}, 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -5101,6 +5328,7 @@ def __init__(self, **kwargs): self.type1 = kwargs.get('type1', None) self.type_handler_version = kwargs.get('type_handler_version', None) self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) self.settings = kwargs.get('settings', None) self.protected_settings = kwargs.get('protected_settings', None) self.provisioning_state = None @@ -5161,6 +5389,10 @@ class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -5191,6 +5423,7 @@ class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): 'type1': {'key': 'properties.type', 'type': 'str'}, 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -5206,6 +5439,7 @@ def __init__(self, **kwargs): self.type1 = kwargs.get('type1', None) self.type_handler_version = kwargs.get('type_handler_version', None) self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) self.settings = kwargs.get('settings', None) self.protected_settings = kwargs.get('protected_settings', None) self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py index 4516e6d813e6..cfad7bff11f0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py @@ -419,6 +419,77 @@ def __init__(self, *, tags=None, platform_update_domain_count: int=None, platfor self.sku = sku +class AvailablePatchSummary(Model): + """Describes the properties of an virtual machine instance view for available + patch summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The overall success or failure status of the operation. It + remains "InProgress" until the operation completes. At that point it will + become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values + include: 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' + :vartype status: str or + ~azure.mgmt.compute.v2020_06_01.models.PatchOperationStatus + :ivar assessment_activity_id: The activity ID of the operation that + produced this result. It is used to correlate across CRP and extension + logs. + :vartype assessment_activity_id: str + :ivar reboot_pending: The overall reboot status of the VM. It will be true + when partially installed patches require a reboot to complete installation + but the reboot has not yet occurred. + :vartype reboot_pending: bool + :ivar critical_and_security_patch_count: The number of critical or + security patches that have been detected as available and not yet + installed. + :vartype critical_and_security_patch_count: int + :ivar other_patch_count: The number of all available patches excluding + critical and security. + :vartype other_patch_count: int + :ivar start_time: The UTC timestamp when the operation began. + :vartype start_time: datetime + :ivar last_modified_time: The UTC timestamp when the operation began. + :vartype last_modified_time: datetime + :ivar error: The errors that were encountered during execution of the + operation. The details array contains the list of them. + :vartype error: ~azure.mgmt.compute.v2020_06_01.models.ApiError + """ + + _validation = { + 'status': {'readonly': True}, + 'assessment_activity_id': {'readonly': True}, + 'reboot_pending': {'readonly': True}, + 'critical_and_security_patch_count': {'readonly': True}, + 'other_patch_count': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'assessment_activity_id': {'key': 'assessmentActivityId', 'type': 'str'}, + 'reboot_pending': {'key': 'rebootPending', 'type': 'bool'}, + 'critical_and_security_patch_count': {'key': 'criticalAndSecurityPatchCount', 'type': 'int'}, + 'other_patch_count': {'key': 'otherPatchCount', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(AvailablePatchSummary, self).__init__(**kwargs) + self.status = None + self.assessment_activity_id = None + self.reboot_pending = None + self.critical_and_security_patch_count = None + self.other_patch_count = None + self.start_time = None + self.last_modified_time = None + self.error = None + + class BillingProfile(Model): """Specifies the billing related details of a Azure Spot VM or VMSS.

Minimum api-version: 2019-03-01. @@ -1875,6 +1946,110 @@ def __init__(self, *, secret_url: str, source_vault, **kwargs) -> None: self.source_vault = source_vault +class LastPatchInstallationSummary(Model): + """Describes the properties of the last installed patch summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The overall success or failure status of the operation. It + remains "InProgress" until the operation completes. At that point it will + become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values + include: 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' + :vartype status: str or + ~azure.mgmt.compute.v2020_06_01.models.PatchOperationStatus + :ivar installation_activity_id: The activity ID of the operation that + produced this result. It is used to correlate across CRP and extension + logs. + :vartype installation_activity_id: str + :ivar maintenance_window_exceeded: Describes whether the operation ran out + of time before it completed all its intended actions + :vartype maintenance_window_exceeded: bool + :ivar reboot_status: The reboot status of the machine after the patch + operation. It will be in "NotNeeded" status if reboot is not needed after + the patch operation. "Required" will be the status once the patch is + applied and machine is required to reboot. "Started" will be the reboot + status when the machine has started to reboot. "Failed" will be the status + if the machine is failed to reboot. "Completed" will be the status once + the machine is rebooted successfully. Possible values include: + 'NotNeeded', 'Required', 'Started', 'Failed', 'Completed' + :vartype reboot_status: str or + ~azure.mgmt.compute.v2020_06_01.models.RebootStatus + :ivar not_selected_patch_count: The number of all available patches but + not going to be installed because it didn't match a classification or + inclusion list entry. + :vartype not_selected_patch_count: int + :ivar excluded_patch_count: The number of all available patches but + excluded explicitly by a customer-specified exclusion list match. + :vartype excluded_patch_count: int + :ivar pending_patch_count: The number of all available patches expected to + be installed over the course of the patch installation operation. + :vartype pending_patch_count: int + :ivar installed_patch_count: The count of patches that successfully + installed. + :vartype installed_patch_count: int + :ivar failed_patch_count: The count of patches that failed installation. + :vartype failed_patch_count: int + :ivar start_time: The UTC timestamp when the operation began. + :vartype start_time: datetime + :ivar last_modified_time: The UTC timestamp when the operation began. + :vartype last_modified_time: datetime + :ivar started_by: The person or system account that started the operation + :vartype started_by: str + :ivar error: The errors that were encountered during execution of the + operation. The details array contains the list of them. + :vartype error: ~azure.mgmt.compute.v2020_06_01.models.ApiError + """ + + _validation = { + 'status': {'readonly': True}, + 'installation_activity_id': {'readonly': True}, + 'maintenance_window_exceeded': {'readonly': True}, + 'reboot_status': {'readonly': True}, + 'not_selected_patch_count': {'readonly': True}, + 'excluded_patch_count': {'readonly': True}, + 'pending_patch_count': {'readonly': True}, + 'installed_patch_count': {'readonly': True}, + 'failed_patch_count': {'readonly': True}, + 'start_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'started_by': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'installation_activity_id': {'key': 'installationActivityId', 'type': 'str'}, + 'maintenance_window_exceeded': {'key': 'maintenanceWindowExceeded', 'type': 'bool'}, + 'reboot_status': {'key': 'rebootStatus', 'type': 'str'}, + 'not_selected_patch_count': {'key': 'notSelectedPatchCount', 'type': 'int'}, + 'excluded_patch_count': {'key': 'excludedPatchCount', 'type': 'int'}, + 'pending_patch_count': {'key': 'pendingPatchCount', 'type': 'int'}, + 'installed_patch_count': {'key': 'installedPatchCount', 'type': 'int'}, + 'failed_patch_count': {'key': 'failedPatchCount', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'started_by': {'key': 'startedBy', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(LastPatchInstallationSummary, self).__init__(**kwargs) + self.status = None + self.installation_activity_id = None + self.maintenance_window_exceeded = None + self.reboot_status = None + self.not_selected_patch_count = None + self.excluded_patch_count = None + self.pending_patch_count = None + self.installed_patch_count = None + self.failed_patch_count = None + self.start_time = None + self.last_modified_time = None + self.started_by = None + self.error = None + + class LinuxConfiguration(Model): """Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on @@ -2419,7 +2594,7 @@ class PatchSettings(Model): automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by - the OS. The properties provisionVMAgent and + the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' :type patch_mode: str or @@ -4254,6 +4429,10 @@ class VirtualMachineExtension(Resource): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -4287,19 +4466,21 @@ class VirtualMachineExtension(Resource): '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'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', '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: + 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, enable_automatic_upgrade: 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.enable_automatic_upgrade = enable_automatic_upgrade self.settings = settings self.protected_settings = protected_settings self.provisioning_state = None @@ -4472,6 +4653,10 @@ class VirtualMachineExtensionUpdate(UpdateResource): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -4487,17 +4672,19 @@ class VirtualMachineExtensionUpdate(UpdateResource): 'type': {'key': 'properties.type', 'type': 'str'}, 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, } - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, enable_automatic_upgrade: bool=None, settings=None, protected_settings=None, **kwargs) -> None: super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) self.force_update_tag = force_update_tag self.publisher = publisher self.type = type self.type_handler_version = type_handler_version self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.enable_automatic_upgrade = enable_automatic_upgrade self.settings = settings self.protected_settings = protected_settings @@ -4737,6 +4924,9 @@ class VirtualMachineInstanceView(Model): :param extensions: The extensions information. :type extensions: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionInstanceView] + :ivar vm_health: The health status for the VM. + :vartype vm_health: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineHealthStatus :param boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

@@ -4751,9 +4941,13 @@ class VirtualMachineInstanceView(Model): :param statuses: The resource status information. :type statuses: list[~azure.mgmt.compute.v2020_06_01.models.InstanceViewStatus] + :param patch_status: The status of virtual machine patch operations. + :type patch_status: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachinePatchStatus """ _validation = { + 'vm_health': {'readonly': True}, 'assigned_host': {'readonly': True}, } @@ -4769,12 +4963,14 @@ class VirtualMachineInstanceView(Model): 'maintenance_redeploy_status': {'key': 'maintenanceRedeployStatus', 'type': 'MaintenanceRedeployStatus'}, 'disks': {'key': 'disks', 'type': '[DiskInstanceView]'}, 'extensions': {'key': 'extensions', 'type': '[VirtualMachineExtensionInstanceView]'}, + 'vm_health': {'key': 'vmHealth', 'type': 'VirtualMachineHealthStatus'}, 'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnosticsInstanceView'}, 'assigned_host': {'key': 'assignedHost', 'type': 'str'}, 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'patch_status': {'key': 'patchStatus', 'type': 'VirtualMachinePatchStatus'}, } - def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, hyper_vgeneration=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, **kwargs) -> None: + def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: int=None, computer_name: str=None, os_name: str=None, os_version: str=None, hyper_vgeneration=None, rdp_thumb_print: str=None, vm_agent=None, maintenance_redeploy_status=None, disks=None, extensions=None, boot_diagnostics=None, statuses=None, patch_status=None, **kwargs) -> None: super(VirtualMachineInstanceView, self).__init__(**kwargs) self.platform_update_domain = platform_update_domain self.platform_fault_domain = platform_fault_domain @@ -4787,9 +4983,35 @@ def __init__(self, *, platform_update_domain: int=None, platform_fault_domain: i self.maintenance_redeploy_status = maintenance_redeploy_status self.disks = disks self.extensions = extensions + self.vm_health = None self.boot_diagnostics = boot_diagnostics self.assigned_host = None self.statuses = statuses + self.patch_status = patch_status + + +class VirtualMachinePatchStatus(Model): + """The status of virtual machine patch operations. + + :param available_patch_summary: The available patch summary of the latest + assessment operation for the virtual machine. + :type available_patch_summary: + ~azure.mgmt.compute.v2020_06_01.models.AvailablePatchSummary + :param last_patch_installation_summary: The installation summary of the + latest installation operation for the virtual machine. + :type last_patch_installation_summary: + ~azure.mgmt.compute.v2020_06_01.models.LastPatchInstallationSummary + """ + + _attribute_map = { + 'available_patch_summary': {'key': 'availablePatchSummary', 'type': 'AvailablePatchSummary'}, + 'last_patch_installation_summary': {'key': 'lastPatchInstallationSummary', 'type': 'LastPatchInstallationSummary'}, + } + + def __init__(self, *, available_patch_summary=None, last_patch_installation_summary=None, **kwargs) -> None: + super(VirtualMachinePatchStatus, self).__init__(**kwargs) + self.available_patch_summary = available_patch_summary + self.last_patch_installation_summary = last_patch_installation_summary class VirtualMachineReimageParameters(Model): @@ -5057,6 +5279,10 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -5086,13 +5312,14 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): 'type1': {'key': 'properties.type', 'type': 'str'}, 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, } - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type1: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: + def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type1: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, enable_automatic_upgrade: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) self.name = name self.type = None @@ -5101,6 +5328,7 @@ def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str self.type1 = type1 self.type_handler_version = type_handler_version self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.enable_automatic_upgrade = enable_automatic_upgrade self.settings = settings self.protected_settings = protected_settings self.provisioning_state = None @@ -5161,6 +5389,10 @@ class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): 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 enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool :param settings: Json formatted public settings for the extension. :type settings: object :param protected_settings: The extension can contain either @@ -5191,13 +5423,14 @@ class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): 'type1': {'key': 'properties.type', 'type': 'str'}, 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, } - def __init__(self, *, force_update_tag: str=None, publisher: str=None, type1: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: + def __init__(self, *, force_update_tag: str=None, publisher: str=None, type1: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, enable_automatic_upgrade: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: super(VirtualMachineScaleSetExtensionUpdate, self).__init__(**kwargs) self.name = None self.type = None @@ -5206,6 +5439,7 @@ def __init__(self, *, force_update_tag: str=None, publisher: str=None, type1: st self.type1 = type1 self.type_handler_version = type_handler_version self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.enable_automatic_upgrade = enable_automatic_upgrade self.settings = settings self.protected_settings = protected_settings self.provisioning_state = None diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vms_operations.py index 29b7cf089ca1..4f51e73d57dd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vms_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -1307,8 +1307,7 @@ def _simulate_eviction_initial( def simulate_eviction( self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): """The operation to simulate the eviction of spot virtual machine in a VM - scale set. The eviction will occur within 30 minutes of calling the - API. + scale set. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py index 3ba00c70c08d..9950fd978ffe 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py @@ -1796,8 +1796,7 @@ def _simulate_eviction_initial( def simulate_eviction( self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to simulate the eviction of spot virtual machine. The - eviction will occur within 30 minutes of calling the API. + """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/compute/azure-mgmt-compute/setup.py b/sdk/compute/azure-mgmt-compute/setup.py index cfcaa1edbaea..9c66a4d27b46 100644 --- a/sdk/compute/azure-mgmt-compute/setup.py +++ b/sdk/compute/azure-mgmt-compute/setup.py @@ -36,7 +36,7 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') +with open(os.path.join(package_folder_path, 'version.py') if os.path.exists(os.path.join(package_folder_path, 'version.py')) else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',