Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from ._models_py3 import AvailabilitySet
from ._models_py3 import AvailabilitySetListResult
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
Expand Down Expand Up @@ -57,6 +58,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 ListUsagesResult
from ._models_py3 import LogAnalyticsInputBase
Expand Down Expand Up @@ -137,6 +139,7 @@
from ._models_py3 import VirtualMachineImageResource
from ._models_py3 import VirtualMachineInstanceView
from ._models_py3 import VirtualMachineListResult
from ._models_py3 import VirtualMachinePatchStatus
from ._models_py3 import VirtualMachineReimageParameters
from ._models_py3 import VirtualMachineScaleSet
from ._models_py3 import VirtualMachineScaleSetDataDisk
Expand Down Expand Up @@ -204,6 +207,7 @@
from ._models import AvailabilitySet # type: ignore
from ._models import AvailabilitySetListResult # type: ignore
from ._models import AvailabilitySetUpdate # type: ignore
from ._models import AvailablePatchSummary # type: ignore
from ._models import BillingProfile # type: ignore
from ._models import BootDiagnostics # type: ignore
from ._models import BootDiagnosticsInstanceView # type: ignore
Expand Down Expand Up @@ -243,6 +247,7 @@
from ._models import InstanceViewStatus # type: ignore
from ._models import KeyVaultKeyReference # type: ignore
from ._models import KeyVaultSecretReference # type: ignore
from ._models import LastPatchInstallationSummary # type: ignore
from ._models import LinuxConfiguration # type: ignore
from ._models import ListUsagesResult # type: ignore
from ._models import LogAnalyticsInputBase # type: ignore
Expand Down Expand Up @@ -323,6 +328,7 @@
from ._models import VirtualMachineImageResource # type: ignore
from ._models import VirtualMachineInstanceView # type: ignore
from ._models import VirtualMachineListResult # type: ignore
from ._models import VirtualMachinePatchStatus # type: ignore
from ._models import VirtualMachineReimageParameters # type: ignore
from ._models import VirtualMachineScaleSet # type: ignore
from ._models import VirtualMachineScaleSetDataDisk # type: ignore
Expand Down Expand Up @@ -400,6 +406,7 @@
PatchOperationStatus,
ProtocolTypes,
ProximityPlacementGroupType,
RebootStatus,
ResourceIdentityType,
RollingUpgradeActionType,
RollingUpgradeStatusCode,
Expand Down Expand Up @@ -430,6 +437,7 @@
'AvailabilitySet',
'AvailabilitySetListResult',
'AvailabilitySetUpdate',
'AvailablePatchSummary',
'BillingProfile',
'BootDiagnostics',
'BootDiagnosticsInstanceView',
Expand Down Expand Up @@ -469,6 +477,7 @@
'InstanceViewStatus',
'KeyVaultKeyReference',
'KeyVaultSecretReference',
'LastPatchInstallationSummary',
'LinuxConfiguration',
'ListUsagesResult',
'LogAnalyticsInputBase',
Expand Down Expand Up @@ -549,6 +558,7 @@
'VirtualMachineImageResource',
'VirtualMachineInstanceView',
'VirtualMachineListResult',
'VirtualMachinePatchStatus',
'VirtualMachineReimageParameters',
'VirtualMachineScaleSet',
'VirtualMachineScaleSetDataDisk',
Expand Down Expand Up @@ -624,6 +634,7 @@
'PatchOperationStatus',
'ProtocolTypes',
'ProximityPlacementGroupType',
'RebootStatus',
'ResourceIdentityType',
'RollingUpgradeActionType',
'RollingUpgradeStatusCode',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class InGuestPatchMode(str, Enum):
must be false:code:`<br />`:code:`<br />` **AutomaticByOS** - The virtual machine will
automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates
must be true. :code:`<br />`:code:`<br />` ** AutomaticByPlatform** - the virtual machine will
automatically updated by the OS. The properties provisionVMAgent and
automatically updated by the platform. The properties provisionVMAgent and
WindowsConfiguration.enableAutomaticUpdates must be true
"""

Expand Down Expand Up @@ -196,6 +196,20 @@ class ProximityPlacementGroupType(str, Enum):
standard = "Standard"
ultra = "Ultra"

class RebootStatus(str, Enum):
"""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
"""

not_needed = "NotNeeded"
required = "Required"
started = "Started"
failed = "Failed"
completed = "Completed"

class ResourceIdentityType(str, Enum):
"""The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned'
includes both an implicitly created identity and a set of user assigned identities. The type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,74 @@ def __init__(
self.statuses = None


class AvailablePatchSummary(msrest.serialization.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.datetime
:ivar last_modified_time: The UTC timestamp when the operation began.
:vartype last_modified_time: ~datetime.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(msrest.serialization.Model):
"""Specifies the billing related details of a Azure Spot VM or VMSS. :code:`<br>`:code:`<br>`Minimum api-version: 2019-03-01.

Expand Down Expand Up @@ -2026,6 +2094,106 @@ def __init__(
self.source_vault = kwargs['source_vault']


class LastPatchInstallationSummary(msrest.serialization.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.datetime
:ivar last_modified_time: The UTC timestamp when the operation began.
:vartype last_modified_time: ~datetime.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(msrest.serialization.Model):
"""Specifies the Linux operating system settings on the virtual machine. :code:`<br>`:code:`<br>`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>`_ :code:`<br>`:code:`<br>` 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>`_.

Expand Down Expand Up @@ -2599,7 +2767,7 @@ class PatchSettings(msrest.serialization.Model):
WindowsConfiguration.enableAutomaticUpdates must be false:code:`<br />`:code:`<br />`
**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property
WindowsConfiguration.enableAutomaticUpdates must be true. :code:`<br />`:code:`<br />` **
AutomaticByPlatform** - the virtual machine will automatically updated by the OS. The
AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The
properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true.
Possible values include: "Manual", "AutomaticByOS", "AutomaticByPlatform".
:type patch_mode: str or ~azure.mgmt.compute.v2020_06_01.models.InGuestPatchMode
Expand Down Expand Up @@ -5018,6 +5186,8 @@ class VirtualMachineInstanceView(msrest.serialization.Model):
:vartype assigned_host: str
: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 = {
Expand All @@ -5041,6 +5211,7 @@ class VirtualMachineInstanceView(msrest.serialization.Model):
'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__(
Expand All @@ -5063,6 +5234,7 @@ def __init__(
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 VirtualMachineListResult(msrest.serialization.Model):
Expand Down Expand Up @@ -5095,6 +5267,32 @@ def __init__(
self.next_link = kwargs.get('next_link', None)


class VirtualMachinePatchStatus(msrest.serialization.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(msrest.serialization.Model):
"""Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged.

Expand Down
Loading