From 385bf1c0c5d9102eccb019ffdfeb2072925b465a Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 20 Dec 2019 23:16:03 +0000 Subject: [PATCH] Generated from 4e1e17f3706be50474e4931bdee8f689c6c1567d Highlighting text to bold. --- .../compute/v2018_10_01/models/_models.py | 9 +- .../compute/v2018_10_01/models/_models_py3.py | 11 +- .../_compute_management_client_enums.py | 4 +- .../compute/v2019_03_01/models/_models.py | 9 +- .../compute/v2019_03_01/models/_models_py3.py | 11 +- .../compute/v2019_07_01/models/__init__.py | 18 + .../_compute_management_client_enums.py | 4 +- .../compute/v2019_07_01/models/_models.py | 702 +++++++++++++++-- .../compute/v2019_07_01/models/_models_py3.py | 714 ++++++++++++++++-- .../operations/_galleries_operations.py | 103 +++ ...gallery_application_versions_operations.py | 121 +++ .../_gallery_applications_operations.py | 110 +++ .../_gallery_image_versions_operations.py | 116 +++ .../operations/_gallery_images_operations.py | 110 +++ ...machine_scale_set_extensions_operations.py | 110 +++ .../_virtual_machines_operations.py | 11 +- 16 files changed, 2015 insertions(+), 148 deletions(-) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py index 53e1a8fc7f40..9f833a1e2aa9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models.py @@ -207,25 +207,20 @@ class AutomaticRepairsPolicy(Model): suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The - default value is 5 minutes (PT5M). + minimum allowed grace period is 30 minutes (PT30M), which is also the + default value. :type grace_period: str - :param max_instance_repairs_percent: The percentage (capacity of scaleset) - of virtual machines that will be simultaneously repaired. The default - value is 20%. - :type max_instance_repairs_percent: int """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'grace_period': {'key': 'gracePeriod', 'type': 'str'}, - 'max_instance_repairs_percent': {'key': 'maxInstanceRepairsPercent', 'type': 'int'}, } def __init__(self, **kwargs): super(AutomaticRepairsPolicy, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) self.grace_period = kwargs.get('grace_period', None) - self.max_instance_repairs_percent = kwargs.get('max_instance_repairs_percent', None) class Resource(Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py index 61c8b473f44e..086f534f9fe1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py @@ -207,25 +207,20 @@ class AutomaticRepairsPolicy(Model): suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The - default value is 5 minutes (PT5M). + minimum allowed grace period is 30 minutes (PT30M), which is also the + default value. :type grace_period: str - :param max_instance_repairs_percent: The percentage (capacity of scaleset) - of virtual machines that will be simultaneously repaired. The default - value is 20%. - :type max_instance_repairs_percent: int """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'grace_period': {'key': 'gracePeriod', 'type': 'str'}, - 'max_instance_repairs_percent': {'key': 'maxInstanceRepairsPercent', 'type': 'int'}, } - def __init__(self, *, enabled: bool=None, grace_period: str=None, max_instance_repairs_percent: int=None, **kwargs) -> None: + def __init__(self, *, enabled: bool=None, grace_period: str=None, **kwargs) -> None: super(AutomaticRepairsPolicy, self).__init__(**kwargs) self.enabled = enabled self.grace_period = grace_period - self.max_instance_repairs_percent = max_instance_repairs_percent class Resource(Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py index 86bae678606b..cad85bece85a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_compute_management_client_enums.py @@ -320,8 +320,8 @@ class VirtualMachineScaleSetScaleInRules(str, Enum): class OperatingSystemStateTypes(str, Enum): - generalized = "Generalized" - specialized = "Specialized" + generalized = "Generalized" #: Generalized image. Needs to be provisioned during deployment time. + specialized = "Specialized" #: Specialized image. Contains already provisioned OS Disk. class IPVersion(str, Enum): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py index 0d52a053f195..f848c5305a81 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py @@ -230,25 +230,20 @@ class AutomaticRepairsPolicy(Model): suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The - default value is 5 minutes (PT5M). + minimum allowed grace period is 30 minutes (PT30M), which is also the + default value. :type grace_period: str - :param max_instance_repairs_percent: The percentage (capacity of scaleset) - of virtual machines that will be simultaneously repaired. The default - value is 20%. - :type max_instance_repairs_percent: int """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'grace_period': {'key': 'gracePeriod', 'type': 'str'}, - 'max_instance_repairs_percent': {'key': 'maxInstanceRepairsPercent', 'type': 'int'}, } def __init__(self, **kwargs): super(AutomaticRepairsPolicy, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) self.grace_period = kwargs.get('grace_period', None) - self.max_instance_repairs_percent = kwargs.get('max_instance_repairs_percent', None) class Resource(Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py index 509c2cf19968..5c6854732a4d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py @@ -230,25 +230,20 @@ class AutomaticRepairsPolicy(Model): suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The - default value is 5 minutes (PT5M). + minimum allowed grace period is 30 minutes (PT30M), which is also the + default value. :type grace_period: str - :param max_instance_repairs_percent: The percentage (capacity of scaleset) - of virtual machines that will be simultaneously repaired. The default - value is 20%. - :type max_instance_repairs_percent: int """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'grace_period': {'key': 'gracePeriod', 'type': 'str'}, - 'max_instance_repairs_percent': {'key': 'maxInstanceRepairsPercent', 'type': 'int'}, } - def __init__(self, *, enabled: bool=None, grace_period: str=None, max_instance_repairs_percent: int=None, **kwargs) -> None: + def __init__(self, *, enabled: bool=None, grace_period: str=None, **kwargs) -> None: super(AutomaticRepairsPolicy, self).__init__(**kwargs) self.enabled = enabled self.grace_period = grace_period - self.max_instance_repairs_percent = max_instance_repairs_percent class Resource(Model): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py index 533d07a8f28d..73039d82a96c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py @@ -52,8 +52,10 @@ from ._models_py3 import EncryptionSettingsElement from ._models_py3 import Gallery from ._models_py3 import GalleryApplication + from ._models_py3 import GalleryApplicationUpdate from ._models_py3 import GalleryApplicationVersion from ._models_py3 import GalleryApplicationVersionPublishingProfile + from ._models_py3 import GalleryApplicationVersionUpdate from ._models_py3 import GalleryArtifactPublishingProfileBase from ._models_py3 import GalleryArtifactSource from ._models_py3 import GalleryArtifactVersionSource @@ -62,10 +64,13 @@ from ._models_py3 import GalleryIdentifier from ._models_py3 import GalleryImage from ._models_py3 import GalleryImageIdentifier + from ._models_py3 import GalleryImageUpdate from ._models_py3 import GalleryImageVersion from ._models_py3 import GalleryImageVersionPublishingProfile from ._models_py3 import GalleryImageVersionStorageProfile + from ._models_py3 import GalleryImageVersionUpdate from ._models_py3 import GalleryOSDiskImage + from ._models_py3 import GalleryUpdate from ._models_py3 import GrantAccessData from ._models_py3 import HardwareProfile from ._models_py3 import Image @@ -164,6 +169,7 @@ from ._models_py3 import VirtualMachineScaleSetDataDisk from ._models_py3 import VirtualMachineScaleSetExtension from ._models_py3 import VirtualMachineScaleSetExtensionProfile + from ._models_py3 import VirtualMachineScaleSetExtensionUpdate from ._models_py3 import VirtualMachineScaleSetIdentity from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue from ._models_py3 import VirtualMachineScaleSetInstanceView @@ -250,8 +256,10 @@ from ._models import EncryptionSettingsElement from ._models import Gallery from ._models import GalleryApplication + from ._models import GalleryApplicationUpdate from ._models import GalleryApplicationVersion from ._models import GalleryApplicationVersionPublishingProfile + from ._models import GalleryApplicationVersionUpdate from ._models import GalleryArtifactPublishingProfileBase from ._models import GalleryArtifactSource from ._models import GalleryArtifactVersionSource @@ -260,10 +268,13 @@ from ._models import GalleryIdentifier from ._models import GalleryImage from ._models import GalleryImageIdentifier + from ._models import GalleryImageUpdate from ._models import GalleryImageVersion from ._models import GalleryImageVersionPublishingProfile from ._models import GalleryImageVersionStorageProfile + from ._models import GalleryImageVersionUpdate from ._models import GalleryOSDiskImage + from ._models import GalleryUpdate from ._models import GrantAccessData from ._models import HardwareProfile from ._models import Image @@ -362,6 +373,7 @@ from ._models import VirtualMachineScaleSetDataDisk from ._models import VirtualMachineScaleSetExtension from ._models import VirtualMachineScaleSetExtensionProfile + from ._models import VirtualMachineScaleSetExtensionUpdate from ._models import VirtualMachineScaleSetIdentity from ._models import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue from ._models import VirtualMachineScaleSetInstanceView @@ -518,8 +530,10 @@ 'EncryptionSettingsElement', 'Gallery', 'GalleryApplication', + 'GalleryApplicationUpdate', 'GalleryApplicationVersion', 'GalleryApplicationVersionPublishingProfile', + 'GalleryApplicationVersionUpdate', 'GalleryArtifactPublishingProfileBase', 'GalleryArtifactSource', 'GalleryArtifactVersionSource', @@ -528,10 +542,13 @@ 'GalleryIdentifier', 'GalleryImage', 'GalleryImageIdentifier', + 'GalleryImageUpdate', 'GalleryImageVersion', 'GalleryImageVersionPublishingProfile', 'GalleryImageVersionStorageProfile', + 'GalleryImageVersionUpdate', 'GalleryOSDiskImage', + 'GalleryUpdate', 'GrantAccessData', 'HardwareProfile', 'Image', @@ -630,6 +647,7 @@ 'VirtualMachineScaleSetDataDisk', 'VirtualMachineScaleSetExtension', 'VirtualMachineScaleSetExtensionProfile', + 'VirtualMachineScaleSetExtensionUpdate', 'VirtualMachineScaleSetIdentity', 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', 'VirtualMachineScaleSetInstanceView', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py index d68461d98830..49f96c0b4b04 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_compute_management_client_enums.py @@ -320,8 +320,8 @@ class VirtualMachineScaleSetScaleInRules(str, Enum): class OperatingSystemStateTypes(str, Enum): - generalized = "Generalized" - specialized = "Specialized" + generalized = "Generalized" #: Generalized image. Needs to be provisioned during deployment time. + specialized = "Specialized" #: Specialized image. Contains already provisioned OS Disk. class IPVersion(str, Enum): diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py index c84c3ecae107..cf519add8b45 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py @@ -230,25 +230,20 @@ class AutomaticRepairsPolicy(Model): suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The - default value is 5 minutes (PT5M). + minimum allowed grace period is 30 minutes (PT30M), which is also the + default value. :type grace_period: str - :param max_instance_repairs_percent: The percentage (capacity of scaleset) - of virtual machines that will be simultaneously repaired. The default - value is 20%. - :type max_instance_repairs_percent: int """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'grace_period': {'key': 'gracePeriod', 'type': 'str'}, - 'max_instance_repairs_percent': {'key': 'maxInstanceRepairsPercent', 'type': 'int'}, } def __init__(self, **kwargs): super(AutomaticRepairsPolicy, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) self.grace_period = kwargs.get('grace_period', None) - self.max_instance_repairs_percent = kwargs.get('max_instance_repairs_percent', None) class Resource(Model): @@ -381,17 +376,38 @@ def __init__(self, **kwargs): class UpdateResource(Model): """The Update Resource model definition. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs): super(UpdateResource, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.id = None + self.name = None + self.type = None class AvailabilitySetUpdate(UpdateResource): @@ -403,6 +419,12 @@ class AvailabilitySetUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param platform_update_domain_count: Update Domain count. :type platform_update_domain_count: int :param platform_fault_domain_count: Fault Domain count. @@ -424,11 +446,17 @@ class AvailabilitySetUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'statuses': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', '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]'}, @@ -625,9 +653,9 @@ class CreationData(Model): 'Import', 'Copy', 'Restore', 'Upload' :type create_option: str or ~azure.mgmt.compute.v2019_07_01.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription + :param storage_account_id: Required if createOption is Import. The Azure + Resource Manager identifier of the storage account containing the blob to + import as a disk. :type storage_account_id: str :param image_reference: Disk source information. :type image_reference: @@ -1011,6 +1039,12 @@ class DedicatedHostGroupUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param platform_fault_domain_count: Required. Number of fault domains that the host group can span. :type platform_fault_domain_count: int @@ -1026,12 +1060,18 @@ class DedicatedHostGroupUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1}, 'hosts': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, 'hosts': {'key': 'properties.hosts', 'type': '[SubResourceReadOnly]'}, 'zones': {'key': 'zones', 'type': '[str]'}, @@ -1087,6 +1127,12 @@ class DedicatedHostUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param platform_fault_domain: Fault domain of the dedicated host within a dedicated host group. :type platform_fault_domain: int @@ -1120,6 +1166,9 @@ class DedicatedHostUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'platform_fault_domain': {'maximum': 2, 'minimum': 0}, 'host_id': {'readonly': True}, 'virtual_machines': {'readonly': True}, @@ -1130,6 +1179,9 @@ class DedicatedHostUpdate(UpdateResource): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'platform_fault_domain': {'key': 'properties.platformFaultDomain', 'type': 'int'}, 'auto_replace_on_failure': {'key': 'properties.autoReplaceOnFailure', 'type': 'bool'}, 'host_id': {'key': 'properties.hostId', 'type': 'str'}, @@ -1571,6 +1623,9 @@ class DiskUpdate(Model): settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. :type disk_mbps_read_write: int + :param encryption: Encryption property can be used to encrypt data at rest + with customer managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2019_07_01.models.Encryption :param tags: Resource tags :type tags: dict[str, str] :param sku: @@ -1583,6 +1638,7 @@ class DiskUpdate(Model): 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'DiskSku'}, } @@ -1594,6 +1650,7 @@ def __init__(self, **kwargs): self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) self.disk_mbps_read_write = kwargs.get('disk_mbps_read_write', None) + self.encryption = kwargs.get('encryption', None) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) @@ -1861,6 +1918,74 @@ def __init__(self, **kwargs): self.supported_os_type = kwargs.get('supported_os_type', None) +class GalleryApplicationUpdate(UpdateResource): + """Specifies information about the gallery Application Definition that you + want to update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param description: The description of this gallery Application Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Application Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param end_of_life_date: The end of life date of the gallery Application + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param supported_os_type: Required. This property allows you to specify + the supported type of the OS that application is built for.

+ Possible values are:

**Windows**

**Linux**. Possible + values include: 'Windows', 'Linux' + :type supported_os_type: str or + ~azure.mgmt.compute.v2019_07_01.models.OperatingSystemTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'supported_os_type': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'supported_os_type': {'key': 'properties.supportedOSType', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, **kwargs): + super(GalleryApplicationUpdate, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.eula = kwargs.get('eula', None) + self.privacy_statement_uri = kwargs.get('privacy_statement_uri', None) + self.release_note_uri = kwargs.get('release_note_uri', None) + self.end_of_life_date = kwargs.get('end_of_life_date', None) + self.supported_os_type = kwargs.get('supported_os_type', None) + + class GalleryApplicationVersion(Resource): """Specifies information about the gallery Application Version that you want to create or update. @@ -2041,6 +2166,63 @@ def __init__(self, **kwargs): self.enable_health_check = kwargs.get('enable_health_check', None) +class GalleryApplicationVersionUpdate(UpdateResource): + """Specifies information about the gallery Application Version that you want + to update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Application + Version. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_07_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryApplicationVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, **kwargs): + super(GalleryApplicationVersionUpdate, self).__init__(**kwargs) + self.publishing_profile = kwargs.get('publishing_profile', None) + self.provisioning_state = None + self.replication_status = None + + class GalleryArtifactSource(Model): """The source image from which the Image Version is going to be created. @@ -2338,6 +2520,117 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) +class GalleryImageUpdate(UpdateResource): + """Specifies information about the gallery Image Definition that you want to + update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param description: The description of this gallery Image Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Image Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk when creating a VM from a managed + image.

Possible values are:

**Windows**

+ **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_07_01.models.OperatingSystemTypes + :param os_state: Required. This property allows the user to specify + whether the virtual machines created under this image are 'Generalized' or + 'Specialized'. Possible values include: 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2019_07_01.models.OperatingSystemStateTypes + :param hyper_vgeneration: The hypervisor generation of the Virtual + Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_07_01.models.HyperVGeneration + :param end_of_life_date: The end of life date of the gallery Image + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param identifier: Required. + :type identifier: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageIdentifier + :param recommended: + :type recommended: + ~azure.mgmt.compute.v2019_07_01.models.RecommendedMachineConfiguration + :param disallowed: + :type disallowed: ~azure.mgmt.compute.v2019_07_01.models.Disallowed + :param purchase_plan: + :type purchase_plan: + ~azure.mgmt.compute.v2019_07_01.models.ImagePurchasePlan + :ivar provisioning_state: The current state of the gallery Image + Definition. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_type': {'required': True}, + 'os_state': {'required': True}, + 'identifier': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryImageUpdate, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.eula = kwargs.get('eula', None) + self.privacy_statement_uri = kwargs.get('privacy_statement_uri', None) + self.release_note_uri = kwargs.get('release_note_uri', None) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.hyper_vgeneration = kwargs.get('hyper_vgeneration', None) + self.end_of_life_date = kwargs.get('end_of_life_date', None) + self.identifier = kwargs.get('identifier', None) + self.recommended = kwargs.get('recommended', None) + self.disallowed = kwargs.get('disallowed', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + self.provisioning_state = None + + class GalleryImageVersion(Resource): """Specifies information about the gallery Image Version that you want to create or update. @@ -2467,16 +2760,78 @@ class GalleryImageVersionStorageProfile(Model): """ _attribute_map = { - 'source': {'key': 'source', 'type': 'GalleryArtifactVersionSource'}, - 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, - 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactVersionSource'}, + 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, + 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + } + + def __init__(self, **kwargs): + super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) + + +class GalleryImageVersionUpdate(UpdateResource): + """Specifies information about the gallery Image Version that you want to + update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param publishing_profile: + :type publishing_profile: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Image Version. + The provisioning state, which only appears in the response. Possible + values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + :param storage_profile: Required. + :type storage_profile: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersionStorageProfile + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_07_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'storage_profile': {'required': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, } def __init__(self, **kwargs): - super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.source = kwargs.get('source', None) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) + super(GalleryImageVersionUpdate, self).__init__(**kwargs) + self.publishing_profile = kwargs.get('publishing_profile', None) + self.provisioning_state = None + self.storage_profile = kwargs.get('storage_profile', None) + self.replication_status = None class GalleryOSDiskImage(GalleryDiskImage): @@ -2512,6 +2867,58 @@ def __init__(self, **kwargs): super(GalleryOSDiskImage, self).__init__(**kwargs) +class GalleryUpdate(UpdateResource): + """Specifies information about the Shared Image Gallery that you want to + update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param description: The description of this Shared Image Gallery resource. + This property is updatable. + :type description: str + :param identifier: + :type identifier: ~azure.mgmt.compute.v2019_07_01.models.GalleryIdentifier + :ivar provisioning_state: The current state of the gallery. The + provisioning state, which only appears in the response. Possible values + include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GalleryUpdate, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.identifier = kwargs.get('identifier', None) + self.provisioning_state = None + + class GrantAccessData(Model): """Data used for requesting a SAS. @@ -2986,6 +3393,12 @@ class ImageUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param source_virtual_machine: The source virtual machine from which Image is created. :type source_virtual_machine: @@ -3003,11 +3416,17 @@ class ImageUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -3572,7 +3991,8 @@ def __init__(self, **kwargs): class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. + """Specifies the operating system settings for the virtual machine. Some of + the settings cannot be changed once VM is provisioned. :param computer_name: Specifies the host OS name of the virtual machine.

This name cannot be updated after the VM is created.

@@ -3582,15 +4002,16 @@ class OSProfile(Model): 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 +

    This property cannot be updated after the VM is created.

    + **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 @@ -3615,8 +4036,13 @@ class OSProfile(Model): :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 + 65535 bytes.

    **Note: Do not pass any secrets or passwords in + customData property**

    This property cannot be updated after the + VM is created.

    customData is passed to the VM to be saved as a + file, for more information see [Custom Data on Azure + VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) +

    For using cloud-init for your Linux 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 @@ -3641,7 +4067,8 @@ class OSProfile(Model): False when no extensions are present on the virtual machine. :type allow_extension_operations: bool :param require_guest_provision_signal: Specifies whether the guest - provision signal is required from the virtual machine. + provision signal is required to infer provision success of the virtual + machine. :type require_guest_provision_signal: bool """ @@ -3775,12 +4202,30 @@ def __init__(self, **kwargs): class ProximityPlacementGroupUpdate(UpdateResource): """Specifies information about the proximity placement group. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs): @@ -4691,6 +5136,9 @@ class SnapshotUpdate(Model): disk or snapshot. :type encryption_settings_collection: ~azure.mgmt.compute.v2019_07_01.models.EncryptionSettingsCollection + :param encryption: Encryption property can be used to encrypt data at rest + with customer managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2019_07_01.models.Encryption :param tags: Resource tags :type tags: dict[str, str] :param sku: @@ -4701,6 +5149,7 @@ class SnapshotUpdate(Model): 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, } @@ -4710,6 +5159,7 @@ def __init__(self, **kwargs): self.os_type = kwargs.get('os_type', None) self.disk_size_gb = kwargs.get('disk_size_gb', None) self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.encryption = kwargs.get('encryption', None) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) @@ -5292,8 +5742,9 @@ class VirtualMachine(Resource): or disabled on the virtual machine. :type additional_capabilities: ~azure.mgmt.compute.v2019_07_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. + :param os_profile: Specifies the operating system settings used while + creating the virtual machine. Some of the settings cannot be changed once + VM is provisioned. :type os_profile: ~azure.mgmt.compute.v2019_07_01.models.OSProfile :param network_profile: Specifies the network interfaces of the virtual machine. @@ -5338,8 +5789,11 @@ class VirtualMachine(Resource): :type priority: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachinePriorityTypes :param eviction_policy: Specifies the eviction policy for the Azure Spot - virtual machine. Only supported value is 'Deallocate'.

    Minimum - api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' + virtual machine and Azure Spot scale set.

    For Azure Spot virtual + machines, the only supported value is 'Deallocate' and the minimum + api-version is 2019-03-01.

    For Azure Spot scale sets, both + 'Deallocate' and 'Delete' are supported and the minimum api-version is + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineEvictionPolicyTypes :param billing_profile: Specifies the billing related details of a Azure @@ -5780,16 +6234,25 @@ def __init__(self, **kwargs): class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param force_update_tag: How the extension handler should be forced to update even if the extension configuration has not changed. :type force_update_tag: str :param publisher: The name of the extension handler publisher. :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str + :param virtual_machine_extension_update_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_update_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 @@ -5805,11 +6268,20 @@ class VirtualMachineExtensionUpdate(UpdateResource): :type protected_settings: object """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, + 'virtual_machine_extension_update_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'}, @@ -5820,7 +6292,7 @@ def __init__(self, **kwargs): super(VirtualMachineExtensionUpdate, self).__init__(**kwargs) self.force_update_tag = kwargs.get('force_update_tag', None) self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) + self.virtual_machine_extension_update_type = kwargs.get('virtual_machine_extension_update_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) @@ -6335,15 +6807,17 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): :vartype id: str :param name: The name of the extension. :type name: str + :ivar type: Resource type + :vartype type: 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 + :param type1: Specifies the type of the extension; an example is "CustomScriptExtension". - :type type: str + :type type1: 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 @@ -6367,15 +6841,17 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): _validation = { 'id': {'readonly': True}, + 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, + 'type1': {'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'}, @@ -6387,9 +6863,10 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): def __init__(self, **kwargs): super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) self.name = kwargs.get('name', None) + self.type = None self.force_update_tag = kwargs.get('force_update_tag', None) self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) + 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.settings = kwargs.get('settings', None) @@ -6416,6 +6893,85 @@ def __init__(self, **kwargs): self.extensions = kwargs.get('extensions', None) +class VirtualMachineScaleSetExtensionUpdate(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 + :ivar name: The name of the extension. + :vartype name: str + :ivar type: Resource type + :vartype type: 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 type1: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type1: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type1': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetExtensionUpdate, self).__init__(**kwargs) + self.name = None + self.type = None + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + 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.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.provision_after_extensions = kwargs.get('provision_after_extensions', None) + + class VirtualMachineScaleSetIdentity(Model): """Identity for the virtual machine scale set. @@ -7174,8 +7730,17 @@ def __init__(self, **kwargs): class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param sku: The virtual machine scale set sku. :type sku: ~azure.mgmt.compute.v2019_07_01.models.Sku :param plan: The purchase plan when deploying a virtual machine scale set @@ -7222,8 +7787,17 @@ class VirtualMachineScaleSetUpdate(UpdateResource): ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetIdentity """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'plan': {'key': 'plan', 'type': 'Plan'}, 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, @@ -7952,8 +8526,11 @@ class VirtualMachineScaleSetVMProfile(Model): values include: 'Regular', 'Low', 'Spot' :type priority: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a Azure Spot scale set.

    Minimum api-version: + :param eviction_policy: Specifies the eviction policy for the Azure Spot + virtual machine and Azure Spot scale set.

    For Azure Spot virtual + machines, the only supported value is 'Deallocate' and the minimum + api-version is 2019-03-01.

    For Azure Spot scale sets, both + 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineEvictionPolicyTypes @@ -8095,6 +8672,12 @@ class VirtualMachineUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype 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 @@ -8115,8 +8698,9 @@ class VirtualMachineUpdate(UpdateResource): or disabled on the virtual machine. :type additional_capabilities: ~azure.mgmt.compute.v2019_07_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. + :param os_profile: Specifies the operating system settings used while + creating the virtual machine. Some of the settings cannot be changed once + VM is provisioned. :type os_profile: ~azure.mgmt.compute.v2019_07_01.models.OSProfile :param network_profile: Specifies the network interfaces of the virtual machine. @@ -8161,8 +8745,11 @@ class VirtualMachineUpdate(UpdateResource): :type priority: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachinePriorityTypes :param eviction_policy: Specifies the eviction policy for the Azure Spot - virtual machine. Only supported value is 'Deallocate'.

    Minimum - api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' + virtual machine and Azure Spot scale set.

    For Azure Spot virtual + machines, the only supported value is 'Deallocate' and the minimum + api-version is 2019-03-01.

    For Azure Spot scale sets, both + 'Deallocate' and 'Delete' are supported and the minimum api-version is + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineEvictionPolicyTypes :param billing_profile: Specifies the billing related details of a Azure @@ -8200,6 +8787,9 @@ class VirtualMachineUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'instance_view': {'readonly': True}, 'vm_id': {'readonly': True}, @@ -8207,6 +8797,9 @@ class VirtualMachineUpdate(UpdateResource): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'plan': {'key': 'plan', 'type': 'Plan'}, 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, @@ -8288,7 +8881,10 @@ class WindowsConfiguration(Model): will take effect on OS reprovisioning. :type enable_automatic_updates: bool :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" + "Pacific Standard Time".

    Possible values can be + [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) + value from time zones returned by + [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones). :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, @@ -8337,9 +8933,9 @@ def __init__(self, **kwargs): 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' + :param protocol: Specifies the protocol of WinRM listener.

    + Possible values are:
    **http**

    **https**. Possible values + include: 'Http', 'Https' :type protocol: str or ~azure.mgmt.compute.v2019_07_01.models.ProtocolTypes :param certificate_url: This is the URL of a certificate that has been diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py index 677afac5e2ce..557a2f4cf266 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py @@ -230,25 +230,20 @@ class AutomaticRepairsPolicy(Model): suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The - default value is 5 minutes (PT5M). + minimum allowed grace period is 30 minutes (PT30M), which is also the + default value. :type grace_period: str - :param max_instance_repairs_percent: The percentage (capacity of scaleset) - of virtual machines that will be simultaneously repaired. The default - value is 20%. - :type max_instance_repairs_percent: int """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'grace_period': {'key': 'gracePeriod', 'type': 'str'}, - 'max_instance_repairs_percent': {'key': 'maxInstanceRepairsPercent', 'type': 'int'}, } - def __init__(self, *, enabled: bool=None, grace_period: str=None, max_instance_repairs_percent: int=None, **kwargs) -> None: + def __init__(self, *, enabled: bool=None, grace_period: str=None, **kwargs) -> None: super(AutomaticRepairsPolicy, self).__init__(**kwargs) self.enabled = enabled self.grace_period = grace_period - self.max_instance_repairs_percent = max_instance_repairs_percent class Resource(Model): @@ -381,17 +376,38 @@ def __init__(self, *, location: str, tags=None, platform_update_domain_count: in class UpdateResource(Model): """The Update Resource model definition. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, *, tags=None, **kwargs) -> None: super(UpdateResource, self).__init__(**kwargs) self.tags = tags + self.id = None + self.name = None + self.type = None class AvailabilitySetUpdate(UpdateResource): @@ -403,6 +419,12 @@ class AvailabilitySetUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param platform_update_domain_count: Update Domain count. :type platform_update_domain_count: int :param platform_fault_domain_count: Fault Domain count. @@ -424,11 +446,17 @@ class AvailabilitySetUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'statuses': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', '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]'}, @@ -625,9 +653,9 @@ class CreationData(Model): 'Import', 'Copy', 'Restore', 'Upload' :type create_option: str or ~azure.mgmt.compute.v2019_07_01.models.DiskCreateOption - :param storage_account_id: If createOption is Import, the Azure Resource - Manager identifier of the storage account containing the blob to import as - a disk. Required only if the blob is in a different subscription + :param storage_account_id: Required if createOption is Import. The Azure + Resource Manager identifier of the storage account containing the blob to + import as a disk. :type storage_account_id: str :param image_reference: Disk source information. :type image_reference: @@ -1011,6 +1039,12 @@ class DedicatedHostGroupUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param platform_fault_domain_count: Required. Number of fault domains that the host group can span. :type platform_fault_domain_count: int @@ -1026,12 +1060,18 @@ class DedicatedHostGroupUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1}, 'hosts': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'}, 'hosts': {'key': 'properties.hosts', 'type': '[SubResourceReadOnly]'}, 'zones': {'key': 'zones', 'type': '[str]'}, @@ -1087,6 +1127,12 @@ class DedicatedHostUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param platform_fault_domain: Fault domain of the dedicated host within a dedicated host group. :type platform_fault_domain: int @@ -1120,6 +1166,9 @@ class DedicatedHostUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'platform_fault_domain': {'maximum': 2, 'minimum': 0}, 'host_id': {'readonly': True}, 'virtual_machines': {'readonly': True}, @@ -1130,6 +1179,9 @@ class DedicatedHostUpdate(UpdateResource): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'platform_fault_domain': {'key': 'properties.platformFaultDomain', 'type': 'int'}, 'auto_replace_on_failure': {'key': 'properties.autoReplaceOnFailure', 'type': 'bool'}, 'host_id': {'key': 'properties.hostId', 'type': 'str'}, @@ -1571,6 +1623,9 @@ class DiskUpdate(Model): settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. :type disk_mbps_read_write: int + :param encryption: Encryption property can be used to encrypt data at rest + with customer managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2019_07_01.models.Encryption :param tags: Resource tags :type tags: dict[str, str] :param sku: @@ -1583,17 +1638,19 @@ class DiskUpdate(Model): 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, 'disk_mbps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'DiskSku'}, } - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, tags=None, sku=None, **kwargs) -> None: + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, disk_iops_read_write: int=None, disk_mbps_read_write: int=None, encryption=None, tags=None, sku=None, **kwargs) -> None: super(DiskUpdate, self).__init__(**kwargs) self.os_type = os_type self.disk_size_gb = disk_size_gb self.encryption_settings_collection = encryption_settings_collection self.disk_iops_read_write = disk_iops_read_write self.disk_mbps_read_write = disk_mbps_read_write + self.encryption = encryption self.tags = tags self.sku = sku @@ -1861,6 +1918,74 @@ def __init__(self, *, location: str, supported_os_type, tags=None, description: self.supported_os_type = supported_os_type +class GalleryApplicationUpdate(UpdateResource): + """Specifies information about the gallery Application Definition that you + want to update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param description: The description of this gallery Application Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Application Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param end_of_life_date: The end of life date of the gallery Application + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param supported_os_type: Required. This property allows you to specify + the supported type of the OS that application is built for.

    + Possible values are:

    **Windows**

    **Linux**. Possible + values include: 'Windows', 'Linux' + :type supported_os_type: str or + ~azure.mgmt.compute.v2019_07_01.models.OperatingSystemTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'supported_os_type': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'supported_os_type': {'key': 'properties.supportedOSType', 'type': 'OperatingSystemTypes'}, + } + + def __init__(self, *, supported_os_type, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, end_of_life_date=None, **kwargs) -> None: + super(GalleryApplicationUpdate, self).__init__(tags=tags, **kwargs) + self.description = description + self.eula = eula + self.privacy_statement_uri = privacy_statement_uri + self.release_note_uri = release_note_uri + self.end_of_life_date = end_of_life_date + self.supported_os_type = supported_os_type + + class GalleryApplicationVersion(Resource): """Specifies information about the gallery Application Version that you want to create or update. @@ -2041,6 +2166,63 @@ def __init__(self, *, source, target_regions=None, replica_count: int=None, excl self.enable_health_check = enable_health_check +class GalleryApplicationVersionUpdate(UpdateResource): + """Specifies information about the gallery Application Version that you want + to update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param publishing_profile: Required. + :type publishing_profile: + ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Application + Version. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_07_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'publishing_profile': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryApplicationVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, + } + + def __init__(self, *, publishing_profile, tags=None, **kwargs) -> None: + super(GalleryApplicationVersionUpdate, self).__init__(tags=tags, **kwargs) + self.publishing_profile = publishing_profile + self.provisioning_state = None + self.replication_status = None + + class GalleryArtifactSource(Model): """The source image from which the Image Version is going to be created. @@ -2338,6 +2520,117 @@ def __init__(self, *, publisher: str, offer: str, sku: str, **kwargs) -> None: self.sku = sku +class GalleryImageUpdate(UpdateResource): + """Specifies information about the gallery Image Definition that you want to + update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param description: The description of this gallery Image Definition + resource. This property is updatable. + :type description: str + :param eula: The Eula agreement for the gallery Image Definition. + :type eula: str + :param privacy_statement_uri: The privacy statement uri. + :type privacy_statement_uri: str + :param release_note_uri: The release note uri. + :type release_note_uri: str + :param os_type: Required. This property allows you to specify the type of + the OS that is included in the disk when creating a VM from a managed + image.

    Possible values are:

    **Windows**

    + **Linux**. Possible values include: 'Windows', 'Linux' + :type os_type: str or + ~azure.mgmt.compute.v2019_07_01.models.OperatingSystemTypes + :param os_state: Required. This property allows the user to specify + whether the virtual machines created under this image are 'Generalized' or + 'Specialized'. Possible values include: 'Generalized', 'Specialized' + :type os_state: str or + ~azure.mgmt.compute.v2019_07_01.models.OperatingSystemStateTypes + :param hyper_vgeneration: The hypervisor generation of the Virtual + Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' + :type hyper_vgeneration: str or + ~azure.mgmt.compute.v2019_07_01.models.HyperVGeneration + :param end_of_life_date: The end of life date of the gallery Image + Definition. This property can be used for decommissioning purposes. This + property is updatable. + :type end_of_life_date: datetime + :param identifier: Required. + :type identifier: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageIdentifier + :param recommended: + :type recommended: + ~azure.mgmt.compute.v2019_07_01.models.RecommendedMachineConfiguration + :param disallowed: + :type disallowed: ~azure.mgmt.compute.v2019_07_01.models.Disallowed + :param purchase_plan: + :type purchase_plan: + ~azure.mgmt.compute.v2019_07_01.models.ImagePurchasePlan + :ivar provisioning_state: The current state of the gallery Image + Definition. The provisioning state, which only appears in the response. + Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_type': {'required': True}, + 'os_state': {'required': True}, + 'identifier': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'eula': {'key': 'properties.eula', 'type': 'str'}, + 'privacy_statement_uri': {'key': 'properties.privacyStatementUri', 'type': 'str'}, + 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, + 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, + 'hyper_vgeneration': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, os_type, os_state, identifier, tags=None, description: str=None, eula: str=None, privacy_statement_uri: str=None, release_note_uri: str=None, hyper_vgeneration=None, end_of_life_date=None, recommended=None, disallowed=None, purchase_plan=None, **kwargs) -> None: + super(GalleryImageUpdate, self).__init__(tags=tags, **kwargs) + self.description = description + self.eula = eula + self.privacy_statement_uri = privacy_statement_uri + self.release_note_uri = release_note_uri + self.os_type = os_type + self.os_state = os_state + self.hyper_vgeneration = hyper_vgeneration + self.end_of_life_date = end_of_life_date + self.identifier = identifier + self.recommended = recommended + self.disallowed = disallowed + self.purchase_plan = purchase_plan + self.provisioning_state = None + + class GalleryImageVersion(Resource): """Specifies information about the gallery Image Version that you want to create or update. @@ -2467,16 +2760,78 @@ class GalleryImageVersionStorageProfile(Model): """ _attribute_map = { - 'source': {'key': 'source', 'type': 'GalleryArtifactVersionSource'}, - 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, - 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + 'source': {'key': 'source', 'type': 'GalleryArtifactVersionSource'}, + 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, + 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, + } + + def __init__(self, *, source=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) + self.source = source + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images + + +class GalleryImageVersionUpdate(UpdateResource): + """Specifies information about the gallery Image Version that you want to + update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param publishing_profile: + :type publishing_profile: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersionPublishingProfile + :ivar provisioning_state: The current state of the gallery Image Version. + The provisioning state, which only appears in the response. Possible + values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + :param storage_profile: Required. + :type storage_profile: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersionStorageProfile + :ivar replication_status: + :vartype replication_status: + ~azure.mgmt.compute.v2019_07_01.models.ReplicationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'storage_profile': {'required': True}, + 'replication_status': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publishing_profile': {'key': 'properties.publishingProfile', 'type': 'GalleryImageVersionPublishingProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'GalleryImageVersionStorageProfile'}, + 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, } - def __init__(self, *, source=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None: - super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.source = source - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images + def __init__(self, *, storage_profile, tags=None, publishing_profile=None, **kwargs) -> None: + super(GalleryImageVersionUpdate, self).__init__(tags=tags, **kwargs) + self.publishing_profile = publishing_profile + self.provisioning_state = None + self.storage_profile = storage_profile + self.replication_status = None class GalleryOSDiskImage(GalleryDiskImage): @@ -2512,6 +2867,58 @@ def __init__(self, *, host_caching=None, source=None, **kwargs) -> None: super(GalleryOSDiskImage, self).__init__(host_caching=host_caching, source=source, **kwargs) +class GalleryUpdate(UpdateResource): + """Specifies information about the Shared Image Gallery that you want to + update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param description: The description of this Shared Image Gallery resource. + This property is updatable. + :type description: str + :param identifier: + :type identifier: ~azure.mgmt.compute.v2019_07_01.models.GalleryIdentifier + :ivar provisioning_state: The current state of the gallery. The + provisioning state, which only appears in the response. Possible values + include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2019_07_01.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryIdentifier'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, identifier=None, **kwargs) -> None: + super(GalleryUpdate, self).__init__(tags=tags, **kwargs) + self.description = description + self.identifier = identifier + self.provisioning_state = None + + class GrantAccessData(Model): """Data used for requesting a SAS. @@ -2986,6 +3393,12 @@ class ImageUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param source_virtual_machine: The source virtual machine from which Image is created. :type source_virtual_machine: @@ -3003,11 +3416,17 @@ class ImageUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'source_virtual_machine': {'key': 'properties.sourceVirtualMachine', 'type': 'SubResource'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'ImageStorageProfile'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -3572,7 +3991,8 @@ def __init__(self, *, operating_system, **kwargs) -> None: class OSProfile(Model): - """Specifies the operating system settings for the virtual machine. + """Specifies the operating system settings for the virtual machine. Some of + the settings cannot be changed once VM is provisioned. :param computer_name: Specifies the host OS name of the virtual machine.

    This name cannot be updated after the VM is created.

    @@ -3582,15 +4002,16 @@ class OSProfile(Model): 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 +

    This property cannot be updated after the VM is created.

    + **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 @@ -3615,8 +4036,13 @@ class OSProfile(Model): :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 + 65535 bytes.

    **Note: Do not pass any secrets or passwords in + customData property**

    This property cannot be updated after the + VM is created.

    customData is passed to the VM to be saved as a + file, for more information see [Custom Data on Azure + VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) +

    For using cloud-init for your Linux 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 @@ -3641,7 +4067,8 @@ class OSProfile(Model): False when no extensions are present on the virtual machine. :type allow_extension_operations: bool :param require_guest_provision_signal: Specifies whether the guest - provision signal is required from the virtual machine. + provision signal is required to infer provision success of the virtual + machine. :type require_guest_provision_signal: bool """ @@ -3775,12 +4202,30 @@ def __init__(self, *, location: str, tags=None, proximity_placement_group_type=N class ProximityPlacementGroupUpdate(UpdateResource): """Specifies information about the proximity placement group. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, *, tags=None, **kwargs) -> None: @@ -4691,6 +5136,9 @@ class SnapshotUpdate(Model): disk or snapshot. :type encryption_settings_collection: ~azure.mgmt.compute.v2019_07_01.models.EncryptionSettingsCollection + :param encryption: Encryption property can be used to encrypt data at rest + with customer managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2019_07_01.models.Encryption :param tags: Resource tags :type tags: dict[str, str] :param sku: @@ -4701,15 +5149,17 @@ class SnapshotUpdate(Model): 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, } - def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, tags=None, sku=None, **kwargs) -> None: + def __init__(self, *, os_type=None, disk_size_gb: int=None, encryption_settings_collection=None, encryption=None, tags=None, sku=None, **kwargs) -> None: super(SnapshotUpdate, self).__init__(**kwargs) self.os_type = os_type self.disk_size_gb = disk_size_gb self.encryption_settings_collection = encryption_settings_collection + self.encryption = encryption self.tags = tags self.sku = sku @@ -5292,8 +5742,9 @@ class VirtualMachine(Resource): or disabled on the virtual machine. :type additional_capabilities: ~azure.mgmt.compute.v2019_07_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. + :param os_profile: Specifies the operating system settings used while + creating the virtual machine. Some of the settings cannot be changed once + VM is provisioned. :type os_profile: ~azure.mgmt.compute.v2019_07_01.models.OSProfile :param network_profile: Specifies the network interfaces of the virtual machine. @@ -5338,8 +5789,11 @@ class VirtualMachine(Resource): :type priority: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachinePriorityTypes :param eviction_policy: Specifies the eviction policy for the Azure Spot - virtual machine. Only supported value is 'Deallocate'.

    Minimum - api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' + virtual machine and Azure Spot scale set.

    For Azure Spot virtual + machines, the only supported value is 'Deallocate' and the minimum + api-version is 2019-03-01.

    For Azure Spot scale sets, both + 'Deallocate' and 'Delete' are supported and the minimum api-version is + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineEvictionPolicyTypes :param billing_profile: Specifies the billing related details of a Azure @@ -5780,16 +6234,25 @@ def __init__(self, *, value=None, **kwargs) -> None: class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param force_update_tag: How the extension handler should be forced to update even if the extension configuration has not changed. :type force_update_tag: str :param publisher: The name of the extension handler publisher. :type publisher: str - :param type: Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str + :param virtual_machine_extension_update_type: Specifies the type of the + extension; an example is "CustomScriptExtension". + :type virtual_machine_extension_update_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 @@ -5805,22 +6268,31 @@ class VirtualMachineExtensionUpdate(UpdateResource): :type protected_settings: object """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, + 'virtual_machine_extension_update_type': {'key': 'properties.type', 'type': 'str'}, 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': 'object'}, 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, } - def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + def __init__(self, *, tags=None, force_update_tag: str=None, publisher: str=None, virtual_machine_extension_update_type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, **kwargs) -> None: super(VirtualMachineExtensionUpdate, self).__init__(tags=tags, **kwargs) self.force_update_tag = force_update_tag self.publisher = publisher - self.type = type + self.virtual_machine_extension_update_type = virtual_machine_extension_update_type self.type_handler_version = type_handler_version self.auto_upgrade_minor_version = auto_upgrade_minor_version self.settings = settings @@ -6335,15 +6807,17 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): :vartype id: str :param name: The name of the extension. :type name: str + :ivar type: Resource type + :vartype type: 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 + :param type1: Specifies the type of the extension; an example is "CustomScriptExtension". - :type type: str + :type type1: 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 @@ -6367,15 +6841,17 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): _validation = { 'id': {'readonly': True}, + 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, + 'type1': {'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'}, @@ -6384,12 +6860,13 @@ class VirtualMachineScaleSetExtension(SubResourceReadOnly): 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, } - def __init__(self, *, name: str=None, force_update_tag: str=None, publisher: str=None, type: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: + 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: super(VirtualMachineScaleSetExtension, self).__init__(**kwargs) self.name = name + self.type = None self.force_update_tag = force_update_tag self.publisher = publisher - self.type = type + self.type1 = type1 self.type_handler_version = type_handler_version self.auto_upgrade_minor_version = auto_upgrade_minor_version self.settings = settings @@ -6416,6 +6893,85 @@ def __init__(self, *, extensions=None, **kwargs) -> None: self.extensions = extensions +class VirtualMachineScaleSetExtensionUpdate(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 + :ivar name: The name of the extension. + :vartype name: str + :ivar type: Resource type + :vartype type: 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 type1: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type1: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param provision_after_extensions: Collection of extension names after + which this extension needs to be provisioned. + :type provision_after_extensions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type1': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + } + + def __init__(self, *, 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: + super(VirtualMachineScaleSetExtensionUpdate, self).__init__(**kwargs) + self.name = None + self.type = None + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type1 = type1 + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.provision_after_extensions = provision_after_extensions + + class VirtualMachineScaleSetIdentity(Model): """Identity for the virtual machine scale set. @@ -7174,8 +7730,17 @@ def __init__(self, *, image_reference=None, os_disk=None, data_disks=None, **kwa class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. + Variables are only populated by the server, and will be ignored when + sending a request. + :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str :param sku: The virtual machine scale set sku. :type sku: ~azure.mgmt.compute.v2019_07_01.models.Sku :param plan: The purchase plan when deploying a virtual machine scale set @@ -7222,8 +7787,17 @@ class VirtualMachineScaleSetUpdate(UpdateResource): ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetIdentity """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'plan': {'key': 'plan', 'type': 'Plan'}, 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'UpgradePolicy'}, @@ -7952,8 +8526,11 @@ class VirtualMachineScaleSetVMProfile(Model): values include: 'Regular', 'Low', 'Spot' :type priority: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachinePriorityTypes - :param eviction_policy: Specifies the eviction policy for virtual machines - in a Azure Spot scale set.

    Minimum api-version: + :param eviction_policy: Specifies the eviction policy for the Azure Spot + virtual machine and Azure Spot scale set.

    For Azure Spot virtual + machines, the only supported value is 'Deallocate' and the minimum + api-version is 2019-03-01.

    For Azure Spot scale sets, both + 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineEvictionPolicyTypes @@ -8095,6 +8672,12 @@ class VirtualMachineUpdate(UpdateResource): :param tags: Resource tags :type tags: dict[str, str] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype 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 @@ -8115,8 +8698,9 @@ class VirtualMachineUpdate(UpdateResource): or disabled on the virtual machine. :type additional_capabilities: ~azure.mgmt.compute.v2019_07_01.models.AdditionalCapabilities - :param os_profile: Specifies the operating system settings for the virtual - machine. + :param os_profile: Specifies the operating system settings used while + creating the virtual machine. Some of the settings cannot be changed once + VM is provisioned. :type os_profile: ~azure.mgmt.compute.v2019_07_01.models.OSProfile :param network_profile: Specifies the network interfaces of the virtual machine. @@ -8161,8 +8745,11 @@ class VirtualMachineUpdate(UpdateResource): :type priority: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachinePriorityTypes :param eviction_policy: Specifies the eviction policy for the Azure Spot - virtual machine. Only supported value is 'Deallocate'.

    Minimum - api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' + virtual machine and Azure Spot scale set.

    For Azure Spot virtual + machines, the only supported value is 'Deallocate' and the minimum + api-version is 2019-03-01.

    For Azure Spot scale sets, both + 'Deallocate' and 'Delete' are supported and the minimum api-version is + 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' :type eviction_policy: str or ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineEvictionPolicyTypes :param billing_profile: Specifies the billing related details of a Azure @@ -8200,6 +8787,9 @@ class VirtualMachineUpdate(UpdateResource): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'instance_view': {'readonly': True}, 'vm_id': {'readonly': True}, @@ -8207,6 +8797,9 @@ class VirtualMachineUpdate(UpdateResource): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'plan': {'key': 'plan', 'type': 'Plan'}, 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, @@ -8288,7 +8881,10 @@ class WindowsConfiguration(Model): will take effect on OS reprovisioning. :type enable_automatic_updates: bool :param time_zone: Specifies the time zone of the virtual machine. e.g. - "Pacific Standard Time" + "Pacific Standard Time".

    Possible values can be + [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) + value from time zones returned by + [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones). :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, @@ -8337,9 +8933,9 @@ def __init__(self, *, listeners=None, **kwargs) -> None: class WinRMListener(Model): """Describes Protocol and thumbprint of Windows Remote Management listener. - :param protocol: Specifies the protocol of listener.

    Possible - values are:
    **http**

    **https**. Possible values include: - 'Http', 'Https' + :param protocol: Specifies the protocol of WinRM listener.

    + Possible values are:
    **http**

    **https**. Possible values + include: 'Http', 'Https' :type protocol: str or ~azure.mgmt.compute.v2019_07_01.models.ProtocolTypes :param certificate_url: This is the URL of a certificate that has been diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_galleries_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_galleries_operations.py index 9cf579a28d61..189b7b3b618e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_galleries_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_galleries_operations.py @@ -148,6 +148,109 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + + def _update_initial( + self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery, 'GalleryUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, gallery_name, gallery, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a Shared Image Gallery. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery. The allowed + characters are alphabets and numbers with dots and periods allowed in + the middle. The maximum length is 80 characters. + :type gallery_name: str + :param gallery: Parameters supplied to the update Shared Image Gallery + operation. + :type gallery: ~azure.mgmt.compute.v2019_07_01.models.GalleryUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Gallery or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_07_01.models.Gallery] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_07_01.models.Gallery]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery=gallery, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Gallery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'} + def get( self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): """Retrieves information about a Shared Image Gallery. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_application_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_application_versions_operations.py index 42011baf9295..29e685096384 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_application_versions_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_application_versions_operations.py @@ -162,6 +162,127 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'} + + def _update_initial( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, publishing_profile, tags=None, custom_headers=None, raw=False, **operation_config): + gallery_application_version = models.GalleryApplicationVersionUpdate(tags=tags, publishing_profile=publishing_profile) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str'), + 'galleryApplicationVersionName': self._serialize.url("gallery_application_version_name", gallery_application_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_application_version, 'GalleryApplicationVersionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryApplicationVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, publishing_profile, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a gallery Application Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition resides. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition in which the Application Version is to be updated. + :type gallery_application_name: str + :param gallery_application_version_name: The name of the gallery + Application Version to be updated. Needs to follow semantic version + name pattern: The allowed characters are digit and period. Digits must + be within the range of a 32-bit integer. Format: + .. + :type gallery_application_version_name: str + :param publishing_profile: + :type publishing_profile: + ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersionPublishingProfile + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + GalleryApplicationVersion or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersion] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersion]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_application_name=gallery_application_name, + gallery_application_version_name=gallery_application_version_name, + publishing_profile=publishing_profile, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryApplicationVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'} + def get( self, resource_group_name, gallery_name, gallery_application_name, gallery_application_version_name, expand=None, custom_headers=None, raw=False, **operation_config): """Retrieves information about a gallery Application Version. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_applications_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_applications_operations.py index c140e2097417..3b6746cae08c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_applications_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_applications_operations.py @@ -155,6 +155,116 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'} + + def _update_initial( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryApplicationName': self._serialize.url("gallery_application_name", gallery_application_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_application, 'GalleryApplicationUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryApplication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, gallery_name, gallery_application_name, gallery_application, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a gallery Application Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Application Gallery in + which the Application Definition is to be updated. + :type gallery_name: str + :param gallery_application_name: The name of the gallery Application + Definition to be updated. The allowed characters are alphabets and + numbers with dots, dashes, and periods allowed in the middle. The + maximum length is 80 characters. + :type gallery_application_name: str + :param gallery_application: Parameters supplied to the update gallery + Application operation. + :type gallery_application: + ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryApplication or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_07_01.models.GalleryApplication] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_07_01.models.GalleryApplication]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_application_name=gallery_application_name, + gallery_application=gallery_application, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryApplication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'} + def get( self, resource_group_name, gallery_name, gallery_application_name, custom_headers=None, raw=False, **operation_config): """Retrieves information about a gallery Application Definition. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_image_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_image_versions_operations.py index d259bb7498c4..950acbd109ef 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_image_versions_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_image_versions_operations.py @@ -161,6 +161,122 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + + def _update_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_image_version, 'GalleryImageVersionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, gallery_image_version, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a gallery Image Version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition resides. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition in + which the Image Version is to be updated. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the gallery Image + Version to be updated. Needs to follow semantic version name pattern: + The allowed characters are digit and period. Digits must be within the + range of a 32-bit integer. Format: + .. + :type gallery_image_version_name: str + :param gallery_image_version: Parameters supplied to the update + gallery Image Version operation. + :type gallery_image_version: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryImageVersion or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersion] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersion]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image_version_name=gallery_image_version_name, + gallery_image_version=gallery_image_version, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryImageVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} + def get( self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, expand=None, custom_headers=None, raw=False, **operation_config): """Retrieves information about a gallery Image Version. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_images_operations.py index 7e161459ff95..1550a645829c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_images_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_gallery_images_operations.py @@ -155,6 +155,116 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + + def _update_initial( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'galleryName': self._serialize.url("gallery_name", gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gallery_image, 'GalleryImageUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, gallery_name, gallery_image_name, gallery_image, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a gallery Image Definition. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gallery_name: The name of the Shared Image Gallery in which the + Image Definition is to be updated. + :type gallery_name: str + :param gallery_image_name: The name of the gallery Image Definition to + be updated. The allowed characters are alphabets and numbers with + dots, dashes, and periods allowed in the middle. The maximum length is + 80 characters. + :type gallery_image_name: str + :param gallery_image: Parameters supplied to the update gallery image + operation. + :type gallery_image: + ~azure.mgmt.compute.v2019_07_01.models.GalleryImageUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GalleryImage or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_07_01.models.GalleryImage] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_07_01.models.GalleryImage]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + gallery_name=gallery_name, + gallery_image_name=gallery_image_name, + gallery_image=gallery_image, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GalleryImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} + def get( self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): """Retrieves information about a gallery Image Definition. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_extensions_operations.py index 03c33ef41308..7198e46e7395 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_extensions_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_extensions_operations.py @@ -152,6 +152,116 @@ def get_long_running_output(response): create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + def _update_initial( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'vmssExtensionName': self._serialize.url("vmss_extension_name", vmss_extension_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetExtensionUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, vmss_extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update an extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set where the + extension should be updated. + :type vm_scale_set_name: str + :param vmss_extension_name: The name of the VM scale set extension. + :type vmss_extension_name: str + :param extension_parameters: Parameters supplied to the Update VM + scale set Extension operation. + :type extension_parameters: + ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetExtensionUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineScaleSetExtension or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetExtension] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetExtension]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + vmss_extension_name=vmss_extension_name, + extension_parameters=extension_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineScaleSetExtension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}'} + + def _delete_initial( self, resource_group_name, vm_scale_set_name, vmss_extension_name, custom_headers=None, raw=False, **operation_config): # Construct URL diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py index d59253d082ea..fdd3f5f441fa 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py @@ -270,7 +270,8 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update a virtual machine. + """The operation to create or update a virtual machine. Please note some + properties can be set only during virtual machine creation. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -797,7 +798,13 @@ def get_long_running_output(response): def generalize( self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): - """Sets the state of the virtual machine to generalized. + """Sets the OS state of the virtual machine to generalized. It is + recommended to sysprep the virtual machine before performing this + operation.
    For Windows, please refer to [Create a managed image of + a generalized VM in + Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).
    For + Linux, please refer to [How to create an image of a virtual machine or + VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image). :param resource_group_name: The name of the resource group. :type resource_group_name: str