diff --git a/sdk/computefleet/azure-mgmt-computefleet/_meta.json b/sdk/computefleet/azure-mgmt-computefleet/_meta.json index e8f721942b7..6647546593c 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/_meta.json +++ b/sdk/computefleet/azure-mgmt-computefleet/_meta.json @@ -1,6 +1,6 @@ { - "commit": "fda3d5e4ae4c69aa72ddfdf5ca1b6d5795a03e71", + "commit": "676334a284e5136f0a0721d6ae844bb04332f579", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/azurefleet/AzureFleet.Management", - "@azure-tools/typespec-python": "0.35.1" + "@azure-tools/typespec-python": "0.38.4" } \ No newline at end of file diff --git a/sdk/computefleet/azure-mgmt-computefleet/apiview-properties.json b/sdk/computefleet/azure-mgmt-computefleet/apiview-properties.json new file mode 100644 index 00000000000..6148e090a88 --- /dev/null +++ b/sdk/computefleet/azure-mgmt-computefleet/apiview-properties.json @@ -0,0 +1,142 @@ +{ + "CrossLanguagePackageId": "Microsoft.AzureFleet", + "CrossLanguageDefinitionId": { + "azure.mgmt.computefleet.models.AdditionalCapabilities": "Microsoft.AzureFleet.AdditionalCapabilities", + "azure.mgmt.computefleet.models.AdditionalLocationsProfile": "Microsoft.AzureFleet.AdditionalLocationsProfile", + "azure.mgmt.computefleet.models.AdditionalUnattendContent": "Microsoft.AzureFleet.AdditionalUnattendContent", + "azure.mgmt.computefleet.models.ApiEntityReference": "Microsoft.AzureFleet.ApiEntityReference", + "azure.mgmt.computefleet.models.ApiError": "Microsoft.AzureFleet.ApiError", + "azure.mgmt.computefleet.models.ApiErrorBase": "Microsoft.AzureFleet.ApiErrorBase", + "azure.mgmt.computefleet.models.ApplicationProfile": "Microsoft.AzureFleet.ApplicationProfile", + "azure.mgmt.computefleet.models.BaseVirtualMachineProfile": "Microsoft.AzureFleet.BaseVirtualMachineProfile", + "azure.mgmt.computefleet.models.BootDiagnostics": "Microsoft.AzureFleet.BootDiagnostics", + "azure.mgmt.computefleet.models.CapacityReservationProfile": "Microsoft.AzureFleet.CapacityReservationProfile", + "azure.mgmt.computefleet.models.ComputeProfile": "Microsoft.AzureFleet.ComputeProfile", + "azure.mgmt.computefleet.models.DiagnosticsProfile": "Microsoft.AzureFleet.DiagnosticsProfile", + "azure.mgmt.computefleet.models.DiffDiskSettings": "Microsoft.AzureFleet.DiffDiskSettings", + "azure.mgmt.computefleet.models.DiskEncryptionSetParameters": "Microsoft.AzureFleet.DiskEncryptionSetParameters", + "azure.mgmt.computefleet.models.EncryptionIdentity": "Microsoft.AzureFleet.EncryptionIdentity", + "azure.mgmt.computefleet.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.computefleet.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.computefleet.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.computefleet.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.computefleet.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.computefleet.models.Fleet": "Microsoft.AzureFleet.Fleet", + "azure.mgmt.computefleet.models.FleetProperties": "Microsoft.AzureFleet.FleetProperties", + "azure.mgmt.computefleet.models.FleetUpdate": "Microsoft.AzureFleet.FleetUpdate", + "azure.mgmt.computefleet.models.ImageReference": "Microsoft.AzureFleet.ImageReference", + "azure.mgmt.computefleet.models.InnerError": "Microsoft.AzureFleet.InnerError", + "azure.mgmt.computefleet.models.KeyVaultSecretReference": "Microsoft.AzureFleet.KeyVaultSecretReference", + "azure.mgmt.computefleet.models.LinuxConfiguration": "Microsoft.AzureFleet.LinuxConfiguration", + "azure.mgmt.computefleet.models.LinuxPatchSettings": "Microsoft.AzureFleet.LinuxPatchSettings", + "azure.mgmt.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformSettings": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings", + "azure.mgmt.computefleet.models.LocationProfile": "Microsoft.AzureFleet.LocationProfile", + "azure.mgmt.computefleet.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "azure.mgmt.computefleet.models.ManagedServiceIdentityUpdate": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate", + "azure.mgmt.computefleet.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", + "azure.mgmt.computefleet.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.computefleet.models.OSImageNotificationProfile": "Microsoft.AzureFleet.OSImageNotificationProfile", + "azure.mgmt.computefleet.models.PatchSettings": "Microsoft.AzureFleet.PatchSettings", + "azure.mgmt.computefleet.models.Plan": "Azure.ResourceManager.CommonTypes.Plan", + "azure.mgmt.computefleet.models.ProxyAgentSettings": "Microsoft.AzureFleet.ProxyAgentSettings", + "azure.mgmt.computefleet.models.PublicIPAddressSku": "Microsoft.AzureFleet.PublicIPAddressSku", + "azure.mgmt.computefleet.models.RegularPriorityProfile": "Microsoft.AzureFleet.RegularPriorityProfile", + "azure.mgmt.computefleet.models.ResourcePlanUpdate": "Microsoft.AzureFleet.ResourcePlanUpdate", + "azure.mgmt.computefleet.models.ScheduledEventsProfile": "Microsoft.AzureFleet.ScheduledEventsProfile", + "azure.mgmt.computefleet.models.SecurityPostureReference": "Microsoft.AzureFleet.SecurityPostureReference", + "azure.mgmt.computefleet.models.SecurityProfile": "Microsoft.AzureFleet.SecurityProfile", + "azure.mgmt.computefleet.models.ServiceArtifactReference": "Microsoft.AzureFleet.ServiceArtifactReference", + "azure.mgmt.computefleet.models.SpotPriorityProfile": "Microsoft.AzureFleet.SpotPriorityProfile", + "azure.mgmt.computefleet.models.SshConfiguration": "Microsoft.AzureFleet.SshConfiguration", + "azure.mgmt.computefleet.models.SshPublicKey": "Microsoft.AzureFleet.SshPublicKey", + "azure.mgmt.computefleet.models.SubResource": "Microsoft.AzureFleet.SubResource", + "azure.mgmt.computefleet.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.computefleet.models.TerminateNotificationProfile": "Microsoft.AzureFleet.TerminateNotificationProfile", + "azure.mgmt.computefleet.models.UefiSettings": "Microsoft.AzureFleet.UefiSettings", + "azure.mgmt.computefleet.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "azure.mgmt.computefleet.models.VaultCertificate": "Microsoft.AzureFleet.VaultCertificate", + "azure.mgmt.computefleet.models.VaultSecretGroup": "Microsoft.AzureFleet.VaultSecretGroup", + "azure.mgmt.computefleet.models.VirtualHardDisk": "Microsoft.AzureFleet.VirtualHardDisk", + "azure.mgmt.computefleet.models.VirtualMachineScaleSet": "Microsoft.AzureFleet.VirtualMachineScaleSet", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetDataDisk": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetExtension": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetExtensionProfile": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetExtensionProperties": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetHardwareProfile": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetIPConfiguration": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetIPConfigurationProperties": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetIpTag": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetManagedDiskParameters": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetNetworkConfiguration": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetNetworkConfigurationProperties": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetNetworkProfile": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetOSDisk": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetOSProfile": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfiguration": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties", + "azure.mgmt.computefleet.models.VirtualMachineScaleSetStorageProfile": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile", + "azure.mgmt.computefleet.models.VMAttributeMinMaxDouble": "Microsoft.AzureFleet.VMAttributeMinMaxDouble", + "azure.mgmt.computefleet.models.VMAttributeMinMaxInteger": "Microsoft.AzureFleet.VMAttributeMinMaxInteger", + "azure.mgmt.computefleet.models.VMAttributes": "Microsoft.AzureFleet.VMAttributes", + "azure.mgmt.computefleet.models.VMDiskSecurityProfile": "Microsoft.AzureFleet.VMDiskSecurityProfile", + "azure.mgmt.computefleet.models.VMGalleryApplication": "Microsoft.AzureFleet.VMGalleryApplication", + "azure.mgmt.computefleet.models.VmSizeProfile": "Microsoft.AzureFleet.VmSizeProfile", + "azure.mgmt.computefleet.models.VMSizeProperties": "Microsoft.AzureFleet.VMSizeProperties", + "azure.mgmt.computefleet.models.WindowsConfiguration": "Microsoft.AzureFleet.WindowsConfiguration", + "azure.mgmt.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformSettings": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings", + "azure.mgmt.computefleet.models.WinRMConfiguration": "Microsoft.AzureFleet.WinRMConfiguration", + "azure.mgmt.computefleet.models.WinRMListener": "Microsoft.AzureFleet.WinRMListener", + "azure.mgmt.computefleet.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "azure.mgmt.computefleet.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "azure.mgmt.computefleet.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.computefleet.models.ProvisioningState": "Microsoft.AzureFleet.ProvisioningState", + "azure.mgmt.computefleet.models.EvictionPolicy": "Microsoft.AzureFleet.EvictionPolicy", + "azure.mgmt.computefleet.models.SpotAllocationStrategy": "Microsoft.AzureFleet.SpotAllocationStrategy", + "azure.mgmt.computefleet.models.RegularPriorityAllocationStrategy": "Microsoft.AzureFleet.RegularPriorityAllocationStrategy", + "azure.mgmt.computefleet.models.VMAttributeSupport": "Microsoft.AzureFleet.VMAttributeSupport", + "azure.mgmt.computefleet.models.LocalStorageDiskType": "Microsoft.AzureFleet.LocalStorageDiskType", + "azure.mgmt.computefleet.models.AcceleratorManufacturer": "Microsoft.AzureFleet.AcceleratorManufacturer", + "azure.mgmt.computefleet.models.AcceleratorType": "Microsoft.AzureFleet.AcceleratorType", + "azure.mgmt.computefleet.models.VMCategory": "Microsoft.AzureFleet.VMCategory", + "azure.mgmt.computefleet.models.ArchitectureType": "Microsoft.AzureFleet.ArchitectureType", + "azure.mgmt.computefleet.models.CpuManufacturer": "Microsoft.AzureFleet.CpuManufacturer", + "azure.mgmt.computefleet.models.SettingNames": "Microsoft.AzureFleet.SettingNames", + "azure.mgmt.computefleet.models.WindowsVMGuestPatchMode": "Microsoft.AzureFleet.WindowsVMGuestPatchMode", + "azure.mgmt.computefleet.models.WindowsPatchAssessmentMode": "Microsoft.AzureFleet.WindowsPatchAssessmentMode", + "azure.mgmt.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "azure.mgmt.computefleet.models.ProtocolTypes": "Microsoft.AzureFleet.ProtocolTypes", + "azure.mgmt.computefleet.models.LinuxVMGuestPatchMode": "Microsoft.AzureFleet.LinuxVMGuestPatchMode", + "azure.mgmt.computefleet.models.LinuxPatchAssessmentMode": "Microsoft.AzureFleet.LinuxPatchAssessmentMode", + "azure.mgmt.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "azure.mgmt.computefleet.models.CachingTypes": "Microsoft.AzureFleet.CachingTypes", + "azure.mgmt.computefleet.models.DiskCreateOptionTypes": "Microsoft.AzureFleet.DiskCreateOptionTypes", + "azure.mgmt.computefleet.models.DiffDiskOptions": "Microsoft.AzureFleet.DiffDiskOptions", + "azure.mgmt.computefleet.models.DiffDiskPlacement": "Microsoft.AzureFleet.DiffDiskPlacement", + "azure.mgmt.computefleet.models.OperatingSystemTypes": "Microsoft.AzureFleet.OperatingSystemTypes", + "azure.mgmt.computefleet.models.StorageAccountTypes": "Microsoft.AzureFleet.StorageAccountTypes", + "azure.mgmt.computefleet.models.SecurityEncryptionTypes": "Microsoft.AzureFleet.SecurityEncryptionTypes", + "azure.mgmt.computefleet.models.DiskDeleteOptionTypes": "Microsoft.AzureFleet.DiskDeleteOptionTypes", + "azure.mgmt.computefleet.models.DiskControllerTypes": "Microsoft.AzureFleet.DiskControllerTypes", + "azure.mgmt.computefleet.models.DomainNameLabelScopeTypes": "Microsoft.AzureFleet.DomainNameLabelScopeTypes", + "azure.mgmt.computefleet.models.IPVersion": "Microsoft.AzureFleet.IPVersion", + "azure.mgmt.computefleet.models.DeleteOptions": "Microsoft.AzureFleet.DeleteOptions", + "azure.mgmt.computefleet.models.PublicIPAddressSkuName": "Microsoft.AzureFleet.PublicIPAddressSkuName", + "azure.mgmt.computefleet.models.PublicIPAddressSkuTier": "Microsoft.AzureFleet.PublicIPAddressSkuTier", + "azure.mgmt.computefleet.models.NetworkInterfaceAuxiliaryMode": "Microsoft.AzureFleet.NetworkInterfaceAuxiliaryMode", + "azure.mgmt.computefleet.models.NetworkInterfaceAuxiliarySku": "Microsoft.AzureFleet.NetworkInterfaceAuxiliarySku", + "azure.mgmt.computefleet.models.NetworkApiVersion": "Microsoft.AzureFleet.NetworkApiVersion", + "azure.mgmt.computefleet.models.SecurityTypes": "Microsoft.AzureFleet.SecurityTypes", + "azure.mgmt.computefleet.models.Mode": "Microsoft.AzureFleet.Mode", + "azure.mgmt.computefleet.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.fleets.get": "Microsoft.AzureFleet.Fleets.get", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.fleets.begin_create_or_update": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.fleets.begin_update": "Microsoft.AzureFleet.Fleets.update", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.fleets.begin_delete": "Microsoft.AzureFleet.Fleets.delete", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.fleets.list_by_resource_group": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.fleets.list_by_subscription": "Microsoft.AzureFleet.Fleets.listBySubscription", + "azure.mgmt.computefleet.ComputeFleetMgmtClient.fleets.list_virtual_machine_scale_sets": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets" + } +} \ No newline at end of file diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/__init__.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/__init__.py index 9ff3c12c42a..ea77f918f67 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/__init__.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._client import ComputeFleetMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ComputeFleetMgmtClient # type: ignore from ._version import VERSION __version__ = VERSION try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -21,6 +27,6 @@ __all__ = [ "ComputeFleetMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_model_base.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_model_base.py index 9d401b0cf01..3072ee252ed 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_model_base.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_model_base.py @@ -5,7 +5,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines +# pylint: disable=protected-access, broad-except import copy import calendar @@ -373,15 +373,34 @@ def __ne__(self, other: typing.Any) -> bool: return not self.__eq__(other) def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ return self._data.items() def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ try: return self[key] except KeyError: @@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ... def pop(self, key: str, default: typing.Any) -> typing.Any: ... def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ if default is _UNSET: return self._data.pop(key) return self._data.pop(key, default) def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ return self._data.popitem() def clear(self) -> None: + """ + Remove all items from D. + """ self._data.clear() def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ self._data.update(*args, **kwargs) @typing.overload @@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ... def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ if default is _UNSET: return self._data.setdefault(key) return self._data.setdefault(key, default) @@ -574,7 +621,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: def copy(self) -> "Model": return Model(self.__dict__) - def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: disable=unused-argument + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' @@ -585,8 +632,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di annotations = { k: v for mro_class in mros - if hasattr(mro_class, "__annotations__") # pylint: disable=no-member - for k, v in mro_class.__annotations__.items() # pylint: disable=no-member + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() } for attr, rf in attr_to_rest_field.items(): rf._module = cls.__module__ @@ -601,8 +648,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: - if hasattr(base, "__mapping__"): # pylint: disable=no-member - base.__mapping__[discriminator or cls.__name__] = cls # type: ignore # pylint: disable=no-member + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore @classmethod def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: @@ -613,7 +660,7 @@ def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField @classmethod def _deserialize(cls, data, exist_discriminators): - if not hasattr(cls, "__mapping__"): # pylint: disable=no-member + if not hasattr(cls, "__mapping__"): return cls(data) discriminator = cls._get_discriminator(exist_discriminators) if discriminator is None: @@ -633,7 +680,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: @@ -754,7 +801,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur except AttributeError: model_name = annotation if module is not None: - annotation = _get_model(module, model_name) + annotation = _get_model(module, model_name) # type: ignore try: if module and _is_model(annotation): @@ -894,6 +941,35 @@ def _deserialize( return _deserialize_with_callable(deserializer, value) +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + class _RestField: def __init__( self, diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_serialization.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_serialization.py index 7b3074215a3..e2a20b1d534 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_serialization.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_serialization.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,9 +48,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -60,13 +59,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -184,73 +183,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset): - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,7 +412,7 @@ def from_dict( :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model :raises: DeserializationError if something went wrong - :rtype: ModelType + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -506,7 +439,6 @@ def _flatten_subtype(cls, key, objects): def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. :param dict response: The initial data :param dict objects: The class objects @@ -518,7 +450,7 @@ def _classify(cls, response, objects): if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -563,7 +495,7 @@ def _decode_attribute_map_key(key): return key.replace("\\.", ".") -class Serializer(object): # pylint: disable=too-many-public-methods +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -598,7 +530,7 @@ class Serializer(object): # pylint: disable=too-many-public-methods "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -626,7 +558,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -736,8 +668,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -781,8 +713,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -805,8 +737,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -835,8 +767,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -855,9 +787,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -1192,7 +1124,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1218,7 +1150,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1251,7 +1183,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1429,7 +1361,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1441,7 +1373,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1452,7 +1384,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1488,7 +1420,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1502,7 +1434,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1683,17 +1615,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None): subtype = getattr(response, "_subtype_map", {}) try: readonly = [ - k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") ] const = [ - k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore @@ -1713,7 +1649,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1795,7 +1731,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1841,7 +1777,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1932,7 +1868,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1945,7 +1881,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1960,7 +1896,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1978,7 +1914,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1991,7 +1927,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2009,7 +1945,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2025,7 +1961,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2040,14 +1976,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2063,7 +1999,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2101,7 +2037,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_version.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_version.py index 0ec13ea52bb..be71c81bd28 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_version.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/__init__.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/__init__.py index 9d35ee9b42b..2deb1f06855 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/__init__.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._client import ComputeFleetMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ComputeFleetMgmtClient # type: ignore try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -18,6 +24,6 @@ __all__ = [ "ComputeFleetMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/__init__.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/__init__.py index 180cf6d7d21..5134d89815c 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/__init__.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/__init__.py @@ -5,17 +5,23 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import Operations -from ._operations import FleetsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import FleetsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "Operations", "FleetsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_operations.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_operations.py index d32a7ad8db3..28f2bf10c14 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_operations.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_operations.py @@ -12,6 +12,7 @@ from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +34,8 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize +from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._serialization import Deserializer, Serializer from ...operations._operations import ( build_fleets_create_or_update_request, build_fleets_delete_request, @@ -44,6 +46,7 @@ build_fleets_update_request, build_operations_list_request, ) +from .._configuration import ComputeFleetMgmtClientConfiguration if sys.version_info >= (3, 9): from collections.abc import MutableMapping @@ -66,10 +69,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeFleetMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: @@ -147,7 +150,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -167,10 +170,10 @@ class FleetsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeFleetMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> _models.Fleet: @@ -225,7 +228,7 @@ async def get(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -290,7 +293,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -515,7 +518,7 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -729,7 +732,7 @@ async def _delete_initial(self, resource_group_name: str, fleet_name: str, **kwa except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -882,7 +885,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -966,7 +969,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1060,7 +1063,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/__init__.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/__init__.py index 4f5387c39f1..45d6f8f6536 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/__init__.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/__init__.py @@ -5,139 +5,150 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models import AdditionalCapabilities -from ._models import AdditionalLocationsProfile -from ._models import AdditionalUnattendContent -from ._models import ApiEntityReference -from ._models import ApiError -from ._models import ApiErrorBase -from ._models import ApplicationProfile -from ._models import BaseVirtualMachineProfile -from ._models import BootDiagnostics -from ._models import CapacityReservationProfile -from ._models import ComputeProfile -from ._models import DiagnosticsProfile -from ._models import DiffDiskSettings -from ._models import DiskEncryptionSetParameters -from ._models import EncryptionIdentity -from ._models import ErrorAdditionalInfo -from ._models import ErrorDetail -from ._models import ErrorResponse -from ._models import Fleet -from ._models import FleetProperties -from ._models import FleetUpdate -from ._models import ImageReference -from ._models import InnerError -from ._models import KeyVaultSecretReference -from ._models import LinuxConfiguration -from ._models import LinuxPatchSettings -from ._models import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models import LocationProfile -from ._models import ManagedServiceIdentity -from ._models import ManagedServiceIdentityUpdate -from ._models import OSImageNotificationProfile -from ._models import Operation -from ._models import OperationDisplay -from ._models import PatchSettings -from ._models import Plan -from ._models import ProxyAgentSettings -from ._models import PublicIPAddressSku -from ._models import RegularPriorityProfile -from ._models import Resource -from ._models import ResourcePlanUpdate -from ._models import ScheduledEventsProfile -from ._models import SecurityPostureReference -from ._models import SecurityProfile -from ._models import ServiceArtifactReference -from ._models import SpotPriorityProfile -from ._models import SshConfiguration -from ._models import SshPublicKey -from ._models import SubResource -from ._models import SystemData -from ._models import TerminateNotificationProfile -from ._models import TrackedResource -from ._models import UefiSettings -from ._models import UserAssignedIdentity -from ._models import VMAttributeMinMaxDouble -from ._models import VMAttributeMinMaxInteger -from ._models import VMAttributes -from ._models import VMDiskSecurityProfile -from ._models import VMGalleryApplication -from ._models import VMSizeProperties -from ._models import VaultCertificate -from ._models import VaultSecretGroup -from ._models import VirtualHardDisk -from ._models import VirtualMachineScaleSet -from ._models import VirtualMachineScaleSetDataDisk -from ._models import VirtualMachineScaleSetExtension -from ._models import VirtualMachineScaleSetExtensionProfile -from ._models import VirtualMachineScaleSetExtensionProperties -from ._models import VirtualMachineScaleSetHardwareProfile -from ._models import VirtualMachineScaleSetIPConfiguration -from ._models import VirtualMachineScaleSetIPConfigurationProperties -from ._models import VirtualMachineScaleSetIpTag -from ._models import VirtualMachineScaleSetManagedDiskParameters -from ._models import VirtualMachineScaleSetNetworkConfiguration -from ._models import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models import VirtualMachineScaleSetNetworkConfigurationProperties -from ._models import VirtualMachineScaleSetNetworkProfile -from ._models import VirtualMachineScaleSetOSDisk -from ._models import VirtualMachineScaleSetOSProfile -from ._models import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models import VirtualMachineScaleSetPublicIPAddressConfigurationProperties -from ._models import VirtualMachineScaleSetStorageProfile -from ._models import VmSizeProfile -from ._models import WinRMConfiguration -from ._models import WinRMListener -from ._models import WindowsConfiguration -from ._models import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._enums import AcceleratorManufacturer -from ._enums import AcceleratorType -from ._enums import ActionType -from ._enums import ArchitectureType -from ._enums import CachingTypes -from ._enums import CpuManufacturer -from ._enums import CreatedByType -from ._enums import DeleteOptions -from ._enums import DiffDiskOptions -from ._enums import DiffDiskPlacement -from ._enums import DiskControllerTypes -from ._enums import DiskCreateOptionTypes -from ._enums import DiskDeleteOptionTypes -from ._enums import DomainNameLabelScopeTypes -from ._enums import EvictionPolicy -from ._enums import IPVersion -from ._enums import LinuxPatchAssessmentMode -from ._enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._enums import LinuxVMGuestPatchMode -from ._enums import LocalStorageDiskType -from ._enums import ManagedServiceIdentityType -from ._enums import Mode -from ._enums import NetworkApiVersion -from ._enums import NetworkInterfaceAuxiliaryMode -from ._enums import NetworkInterfaceAuxiliarySku -from ._enums import OperatingSystemTypes -from ._enums import Origin -from ._enums import ProtocolTypes -from ._enums import ProvisioningState -from ._enums import PublicIPAddressSkuName -from ._enums import PublicIPAddressSkuTier -from ._enums import RegularPriorityAllocationStrategy -from ._enums import SecurityEncryptionTypes -from ._enums import SecurityTypes -from ._enums import SettingNames -from ._enums import SpotAllocationStrategy -from ._enums import StorageAccountTypes -from ._enums import VMAttributeSupport -from ._enums import VMCategory -from ._enums import WindowsPatchAssessmentMode -from ._enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + AdditionalCapabilities, + AdditionalLocationsProfile, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + BaseVirtualMachineProfile, + BootDiagnostics, + CapacityReservationProfile, + ComputeProfile, + DiagnosticsProfile, + DiffDiskSettings, + DiskEncryptionSetParameters, + EncryptionIdentity, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Fleet, + FleetProperties, + FleetUpdate, + ImageReference, + InnerError, + KeyVaultSecretReference, + LinuxConfiguration, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + LocationProfile, + ManagedServiceIdentity, + ManagedServiceIdentityUpdate, + OSImageNotificationProfile, + Operation, + OperationDisplay, + PatchSettings, + Plan, + ProxyAgentSettings, + PublicIPAddressSku, + RegularPriorityProfile, + Resource, + ResourcePlanUpdate, + ScheduledEventsProfile, + SecurityPostureReference, + SecurityProfile, + ServiceArtifactReference, + SpotPriorityProfile, + SshConfiguration, + SshPublicKey, + SubResource, + SystemData, + TerminateNotificationProfile, + TrackedResource, + UefiSettings, + UserAssignedIdentity, + VMAttributeMinMaxDouble, + VMAttributeMinMaxInteger, + VMAttributes, + VMDiskSecurityProfile, + VMGalleryApplication, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionProperties, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIPConfigurationProperties, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkConfigurationProperties, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetPublicIPAddressConfigurationProperties, + VirtualMachineScaleSetStorageProfile, + VmSizeProfile, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._enums import ( # type: ignore + AcceleratorManufacturer, + AcceleratorType, + ActionType, + ArchitectureType, + CachingTypes, + CpuManufacturer, + CreatedByType, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DomainNameLabelScopeTypes, + EvictionPolicy, + IPVersion, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + LocalStorageDiskType, + ManagedServiceIdentityType, + Mode, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + OperatingSystemTypes, + Origin, + ProtocolTypes, + ProvisioningState, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + RegularPriorityAllocationStrategy, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + SpotAllocationStrategy, + StorageAccountTypes, + VMAttributeSupport, + VMCategory, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -271,5 +282,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_enums.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_enums.py index dcfe49071de..6742775bb42 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_enums.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_enums.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -107,9 +108,9 @@ class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): resource disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at - https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements + https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at - https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements + https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements Minimum api-version for NvmeDisk: 2024-03-01. """ @@ -125,10 +126,10 @@ class DiskControllerTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 - (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please + (https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 - (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more + (https://learn.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes. """ @@ -212,9 +213,9 @@ class IPVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): class LinuxPatchAssessmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the mode of VM Guest Patch Assessment for the IaaS virtual - machine.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` - **ImageDefault** - You - control the timing of patch assessments on a virtual machine. :code:`
`:code:`
` + machine.\\ :code:`
`\\ :code:`
` Possible values are:\\ :code:`
`\\ :code:`
` **ImageDefault** - You + control the timing of patch assessments on a virtual machine. :code:`
`\\ :code:`
` **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. """ @@ -274,7 +275,7 @@ class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """System assigned managed identity.""" USER_ASSIGNED = "UserAssigned" """User assigned managed identity.""" - SYSTEM_AND_USER_ASSIGNED = "SystemAssigned,UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" """System and user assigned managed identity.""" @@ -474,9 +475,9 @@ class StorageAccountTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to - https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for + https://learn.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to - https://docs.microsoft.com/azure/virtual-machines/linux/disks-types. + https://learn.microsoft.com/azure/virtual-machines/linux/disks-types. """ STANDARD_LRS = "Standard_LRS" diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_models.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_models.py index 55e1a980db8..89c4e45251e 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_models.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_models.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,6 +6,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation import datetime from typing import Any, Dict, List, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload @@ -29,12 +30,16 @@ class AdditionalCapabilities(_model_base.Model): :vartype hibernation_enabled: bool """ - ultra_ssd_enabled: Optional[bool] = rest_field(name="ultraSSDEnabled") + ultra_ssd_enabled: Optional[bool] = rest_field( + name="ultraSSDEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.""" - hibernation_enabled: Optional[bool] = rest_field(name="hibernationEnabled") + hibernation_enabled: Optional[bool] = rest_field( + name="hibernationEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """The flag that enables or disables hibernation capability on the VM.""" @overload @@ -43,16 +48,16 @@ def __init__( *, ultra_ssd_enabled: Optional[bool] = None, hibernation_enabled: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -64,7 +69,9 @@ class AdditionalLocationsProfile(_model_base.Model): :vartype location_profiles: list[~azure.mgmt.computefleet.models.LocationProfile] """ - location_profiles: List["_models.LocationProfile"] = rest_field(name="locationProfiles") + location_profiles: List["_models.LocationProfile"] = rest_field( + name="locationProfiles", visibility=["read", "create", "update", "delete", "query"] + ) """The list of location profiles. Required.""" @overload @@ -72,16 +79,16 @@ def __init__( self, *, location_profiles: List["_models.LocationProfile"], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -106,13 +113,19 @@ class AdditionalUnattendContent(_model_base.Model): :vartype content: str """ - pass_name: Optional[Literal["OobeSystem"]] = rest_field(name="passName") + pass_name: Optional[Literal["OobeSystem"]] = rest_field( + name="passName", visibility=["read", "create", "update", "delete", "query"] + ) """The pass name. Currently, the only allowable value is OobeSystem. Default value is \"OobeSystem\".""" - component_name: Optional[Literal["Microsoft-Windows-Shell-Setup"]] = rest_field(name="componentName") + component_name: Optional[Literal["Microsoft-Windows-Shell-Setup"]] = rest_field( + name="componentName", visibility=["read", "create", "update", "delete", "query"] + ) """The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Default value is \"Microsoft-Windows-Shell-Setup\".""" - setting_name: Optional[Union[str, "_models.SettingNames"]] = rest_field(name="settingName") + setting_name: Optional[Union[str, "_models.SettingNames"]] = rest_field( + name="settingName", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Known values are: \"AutoLogon\" and \"FirstLogonCommands\".""" @@ -129,16 +142,16 @@ def __init__( component_name: Optional[Literal["Microsoft-Windows-Shell-Setup"]] = None, setting_name: Optional[Union[str, "_models.SettingNames"]] = None, content: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -150,7 +163,7 @@ class ApiEntityReference(_model_base.Model): :vartype id: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...""" @@ -159,16 +172,16 @@ def __init__( self, *, id: Optional[str] = None, # pylint: disable=redefined-builtin - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -187,15 +200,17 @@ class ApiError(_model_base.Model): :vartype innererror: ~azure.mgmt.computefleet.models.InnerError """ - code: Optional[str] = rest_field() + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error code.""" - target: Optional[str] = rest_field() + target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The target of the particular error.""" - message: Optional[str] = rest_field() + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error message.""" - details: Optional[List["_models.ApiErrorBase"]] = rest_field() + details: Optional[List["_models.ApiErrorBase"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The API error details.""" - innererror: Optional["_models.InnerError"] = rest_field() + innererror: Optional["_models.InnerError"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The API inner error.""" @overload @@ -207,16 +222,16 @@ def __init__( message: Optional[str] = None, details: Optional[List["_models.ApiErrorBase"]] = None, innererror: Optional["_models.InnerError"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -231,11 +246,11 @@ class ApiErrorBase(_model_base.Model): :vartype message: str """ - code: Optional[str] = rest_field() + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error code.""" - target: Optional[str] = rest_field() + target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The target of the particular error.""" - message: Optional[str] = rest_field() + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error message.""" @overload @@ -245,16 +260,16 @@ def __init__( code: Optional[str] = None, target: Optional[str] = None, message: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -267,7 +282,9 @@ class ApplicationProfile(_model_base.Model): :vartype gallery_applications: list[~azure.mgmt.computefleet.models.VMGalleryApplication] """ - gallery_applications: Optional[List["_models.VMGalleryApplication"]] = rest_field(name="galleryApplications") + gallery_applications: Optional[List["_models.VMGalleryApplication"]] = rest_field( + name="galleryApplications", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the gallery applications that should be made available to the VM/VMSS.""" @overload @@ -275,20 +292,20 @@ def __init__( self, *, gallery_applications: Optional[List["_models.VMGalleryApplication"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BaseVirtualMachineProfile(_model_base.Model): # pylint: disable=too-many-instance-attributes +class BaseVirtualMachineProfile(_model_base.Model): """Describes the base virtual machine profile for fleet. Readonly variables are only populated by the server, and will be ignored when sending a request. @@ -315,19 +332,19 @@ class BaseVirtualMachineProfile(_model_base.Model): # pylint: disable=too-many- ~azure.mgmt.computefleet.models.VirtualMachineScaleSetExtensionProfile :ivar license_type: Specifies that the image or disk that is being used was licensed on-premises. - :code:`
`:code:`
` Possible values for Windows Server operating system are: - :code:`
`:code:`
` - Windows_Client :code:`
`:code:`
` Windows_Server :code:`
`:code:`
` Possible + :code:`
`\\ :code:`
` Possible values for Windows Server operating system are: + :code:`
`\\ :code:`
` + Windows_Client :code:`
`\\ :code:`
` Windows_Server :code:`
`\\ :code:`
` Possible values for Linux - Server operating system are: :code:`
`:code:`
` RHEL_BYOS (for RHEL) - :code:`
`:code:`
` SLES_BYOS - (for SUSE) :code:`
`:code:`
` For more information, see `Azure Hybrid Use Benefit for + Server operating system are: :code:`
`\\ :code:`
` RHEL_BYOS (for RHEL) :code:`
`\\ + :code:`
` SLES_BYOS + (for SUSE) :code:`
`\\ :code:`
` For more information, see `Azure Hybrid Use Benefit for Windows Server - `_ - :code:`
`:code:`
` `Azure Hybrid Use Benefit for Linux - Server `_ - :code:`
`:code:`
` Minimum api-version: 2015-06-15. + `_ + :code:`
`\\ :code:`
` `Azure Hybrid Use Benefit for Linux + Server `_ + :code:`
`\\ :code:`
` Minimum api-version: 2015-06-15. :vartype license_type: str :ivar scheduled_events_profile: Specifies Scheduled Event related configurations. :vartype scheduled_events_profile: ~azure.mgmt.computefleet.models.ScheduledEventsProfile @@ -363,59 +380,81 @@ class BaseVirtualMachineProfile(_model_base.Model): # pylint: disable=too-many- :vartype time_created: ~datetime.datetime """ - os_profile: Optional["_models.VirtualMachineScaleSetOSProfile"] = rest_field(name="osProfile") + os_profile: Optional["_models.VirtualMachineScaleSetOSProfile"] = rest_field( + name="osProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the operating system settings for the virtual machines in the scale set.""" - storage_profile: Optional["_models.VirtualMachineScaleSetStorageProfile"] = rest_field(name="storageProfile") + storage_profile: Optional["_models.VirtualMachineScaleSetStorageProfile"] = rest_field( + name="storageProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the storage settings for the virtual machine disks.""" - network_profile: Optional["_models.VirtualMachineScaleSetNetworkProfile"] = rest_field(name="networkProfile") + network_profile: Optional["_models.VirtualMachineScaleSetNetworkProfile"] = rest_field( + name="networkProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies properties of the network interfaces of the virtual machines in the scale set.""" - security_profile: Optional["_models.SecurityProfile"] = rest_field(name="securityProfile") + security_profile: Optional["_models.SecurityProfile"] = rest_field( + name="securityProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the Security related profile settings for the virtual machines in the scale set.""" - diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field(name="diagnosticsProfile") + diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field( + name="diagnosticsProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the boot diagnostic settings state.""" - extension_profile: Optional["_models.VirtualMachineScaleSetExtensionProfile"] = rest_field(name="extensionProfile") + extension_profile: Optional["_models.VirtualMachineScaleSetExtensionProfile"] = rest_field( + name="extensionProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies a collection of settings for extensions installed on virtual machines in the scale set.""" - license_type: Optional[str] = rest_field(name="licenseType") + license_type: Optional[str] = rest_field( + name="licenseType", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies that the image or disk that is being used was licensed on-premises. - :code:`
`:code:`
` Possible values for Windows Server operating system are: - :code:`
`:code:`
` - Windows_Client :code:`
`:code:`
` Windows_Server :code:`
`:code:`
` Possible values - for Linux - Server operating system are: :code:`
`:code:`
` RHEL_BYOS (for RHEL) - :code:`
`:code:`
` SLES_BYOS - (for SUSE) :code:`
`:code:`
` For more information, see `Azure Hybrid Use Benefit for + :code:`
`\ :code:`
` Possible values for Windows Server operating system are: + :code:`
`\ :code:`
` + Windows_Client :code:`
`\ :code:`
` Windows_Server :code:`
`\ :code:`
` Possible + values for Linux + Server operating system are: :code:`
`\ :code:`
` RHEL_BYOS (for RHEL) :code:`
`\ + :code:`
` SLES_BYOS + (for SUSE) :code:`
`\ :code:`
` For more information, see `Azure Hybrid Use Benefit for Windows Server - `_ - :code:`
`:code:`
` `Azure Hybrid Use Benefit for Linux - Server `_ - :code:`
`:code:`
` Minimum api-version: 2015-06-15.""" - scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = rest_field(name="scheduledEventsProfile") + `_ + :code:`
`\ :code:`
` `Azure Hybrid Use Benefit for Linux + Server `_ + :code:`
`\ :code:`
` Minimum api-version: 2015-06-15.""" + scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = rest_field( + name="scheduledEventsProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies Scheduled Event related configurations.""" - user_data: Optional[str] = rest_field(name="userData") + user_data: Optional[str] = rest_field(name="userData", visibility=["read", "create", "update", "delete", "query"]) """UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.""" - capacity_reservation: Optional["_models.CapacityReservationProfile"] = rest_field(name="capacityReservation") + capacity_reservation: Optional["_models.CapacityReservationProfile"] = rest_field( + name="capacityReservation", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01.""" - application_profile: Optional["_models.ApplicationProfile"] = rest_field(name="applicationProfile") + application_profile: Optional["_models.ApplicationProfile"] = rest_field( + name="applicationProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the gallery applications that should be made available to the VM/VMSS.""" - hardware_profile: Optional["_models.VirtualMachineScaleSetHardwareProfile"] = rest_field(name="hardwareProfile") + hardware_profile: Optional["_models.VirtualMachineScaleSetHardwareProfile"] = rest_field( + name="hardwareProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.""" service_artifact_reference: Optional["_models.ServiceArtifactReference"] = rest_field( - name="serviceArtifactReference" + name="serviceArtifactReference", visibility=["read", "create", "update", "delete", "query"] ) """Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01.""" security_posture_reference: Optional["_models.SecurityPostureReference"] = rest_field( - name="securityPostureReference" + name="securityPostureReference", visibility=["read", "create", "update", "delete", "query"] ) """Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01.""" @@ -443,16 +482,16 @@ def __init__( hardware_profile: Optional["_models.VirtualMachineScaleSetHardwareProfile"] = None, service_artifact_reference: Optional["_models.ServiceArtifactReference"] = None, security_posture_reference: Optional["_models.SecurityPostureReference"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -470,9 +509,11 @@ class BootDiagnostics(_model_base.Model): :vartype storage_uri: str """ - enabled: Optional[bool] = rest_field() + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Whether boot diagnostics should be enabled on the Virtual Machine.""" - storage_uri: Optional[str] = rest_field(name="storageUri") + storage_uri: Optional[str] = rest_field( + name="storageUri", visibility=["read", "create", "update", "delete", "query"] + ) """Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.""" @@ -483,16 +524,16 @@ def __init__( *, enabled: Optional[bool] = None, storage_uri: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -507,7 +548,9 @@ class CapacityReservationProfile(_model_base.Model): :vartype capacity_reservation_group: ~azure.mgmt.computefleet.models.SubResource """ - capacity_reservation_group: Optional["_models.SubResource"] = rest_field(name="capacityReservationGroup") + capacity_reservation_group: Optional["_models.SubResource"] = rest_field( + name="capacityReservationGroup", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation @@ -518,16 +561,16 @@ def __init__( self, *, capacity_reservation_group: Optional["_models.SubResource"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -537,7 +580,7 @@ class ComputeProfile(_model_base.Model): :ivar base_virtual_machine_profile: Base Virtual Machine Profile Properties to be specified according to - "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile". # pylint: disable=line-too-long + "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile". Required. :vartype base_virtual_machine_profile: ~azure.mgmt.computefleet.models.BaseVirtualMachineProfile @@ -562,15 +605,21 @@ class ComputeProfile(_model_base.Model): ~azure.mgmt.computefleet.models.AdditionalCapabilities """ - base_virtual_machine_profile: "_models.BaseVirtualMachineProfile" = rest_field(name="baseVirtualMachineProfile") + base_virtual_machine_profile: "_models.BaseVirtualMachineProfile" = rest_field( + name="baseVirtualMachineProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Base Virtual Machine Profile Properties to be specified according to - \"specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile\". # pylint: disable=line-too-long + \"specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile\". Required.""" - compute_api_version: Optional[str] = rest_field(name="computeApiVersion") + compute_api_version: Optional[str] = rest_field( + name="computeApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machine scale sets and Virtual Machines. The default value will be the latest supported computeApiVersion by Compute Fleet.""" - platform_fault_domain_count: Optional[int] = rest_field(name="platformFaultDomainCount") + platform_fault_domain_count: Optional[int] = rest_field( + name="platformFaultDomainCount", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the number of fault domains to use when creating the underlying VMSS. A fault domain is a logical group of hardware within an Azure datacenter. VMs in the same fault domain share a common power source and network switch. @@ -578,7 +627,7 @@ class ComputeProfile(_model_base.Model): domains as possible). This property cannot be updated.""" additional_virtual_machine_capabilities: Optional["_models.AdditionalCapabilities"] = rest_field( - name="additionalVirtualMachineCapabilities" + name="additionalVirtualMachineCapabilities", visibility=["read", "create", "update", "delete", "query"] ) """Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled. @@ -594,16 +643,16 @@ def __init__( compute_api_version: Optional[str] = None, platform_fault_domain_count: Optional[int] = None, additional_virtual_machine_capabilities: Optional["_models.AdditionalCapabilities"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -619,7 +668,9 @@ class DiagnosticsProfile(_model_base.Model): :vartype boot_diagnostics: ~azure.mgmt.computefleet.models.BootDiagnostics """ - boot_diagnostics: Optional["_models.BootDiagnostics"] = rest_field(name="bootDiagnostics") + boot_diagnostics: Optional["_models.BootDiagnostics"] = rest_field( + name="bootDiagnostics", visibility=["read", "create", "update", "delete", "query"] + ) """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**\ : If storageUri is being specified then ensure that the storage account is in the same region and @@ -631,16 +682,16 @@ def __init__( self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -655,21 +706,25 @@ class DiffDiskSettings(_model_base.Model): values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at - https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at - https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM + https://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at + https://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Known values are: "CacheDisk", "ResourceDisk", and "NvmeDisk". :vartype placement: str or ~azure.mgmt.computefleet.models.DiffDiskPlacement """ - option: Optional[Union[str, "_models.DiffDiskOptions"]] = rest_field() + option: Optional[Union[str, "_models.DiffDiskOptions"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the ephemeral disk settings for operating system disk. \"Local\"""" - placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = rest_field() + placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at - https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at - https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM + https://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at + https://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Known values are: \"CacheDisk\", \"ResourceDisk\", and \"NvmeDisk\".""" @@ -679,16 +734,16 @@ def __init__( *, option: Optional[Union[str, "_models.DiffDiskOptions"]] = None, placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -702,7 +757,7 @@ class DiskEncryptionSetParameters(_model_base.Model): :vartype id: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource Id.""" @overload @@ -710,16 +765,16 @@ def __init__( self, *, id: Optional[str] = None, # pylint: disable=redefined-builtin - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -732,7 +787,9 @@ class EncryptionIdentity(_model_base.Model): :vartype user_assigned_identity_resource_id: str """ - user_assigned_identity_resource_id: Optional[str] = rest_field(name="userAssignedIdentityResourceId") + user_assigned_identity_resource_id: Optional[str] = rest_field( + name="userAssignedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies ARM Resource ID of one of the user identities associated with the VM.""" @overload @@ -740,16 +797,16 @@ def __init__( self, *, user_assigned_identity_resource_id: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -809,7 +866,7 @@ class ErrorResponse(_model_base.Model): :vartype error: ~azure.mgmt.computefleet.models.ErrorDetail """ - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error object.""" @overload @@ -817,16 +874,16 @@ def __init__( self, *, error: Optional["_models.ErrorDetail"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -836,7 +893,7 @@ class Resource(_model_base.Model): Readonly variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -850,7 +907,7 @@ class Resource(_model_base.Model): id: Optional[str] = rest_field(visibility=["read"]) """Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long""" + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" name: Optional[str] = rest_field(visibility=["read"]) """The name of the resource.""" type: Optional[str] = rest_field(visibility=["read"]) @@ -868,7 +925,7 @@ class TrackedResource(Resource): :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -884,7 +941,7 @@ class TrackedResource(Resource): :vartype location: str """ - tags: Optional[Dict[str, str]] = rest_field() + tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" location: str = rest_field(visibility=["read", "create"]) """The geo-location where the resource lives. Required.""" @@ -895,16 +952,16 @@ def __init__( *, location: str, tags: Optional[Dict[str, str]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -915,7 +972,7 @@ class Fleet(TrackedResource): :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -939,13 +996,17 @@ class Fleet(TrackedResource): :vartype plan: ~azure.mgmt.computefleet.models.Plan """ - properties: Optional["_models.FleetProperties"] = rest_field() + properties: Optional["_models.FleetProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" - zones: Optional[List[str]] = rest_field() + zones: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Zones in which the Compute Fleet is available.""" - identity: Optional["_models.ManagedServiceIdentity"] = rest_field() + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The managed service identities assigned to this resource.""" - plan: Optional["_models.Plan"] = rest_field() + plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Details of the resource plan.""" @overload @@ -958,16 +1019,16 @@ def __init__( zones: Optional[List[str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, plan: Optional["_models.Plan"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1005,19 +1066,29 @@ class FleetProperties(_model_base.Model): ) """The status of the last operation. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Creating\", \"Updating\", \"Deleting\", and \"Migrating\".""" - spot_priority_profile: Optional["_models.SpotPriorityProfile"] = rest_field(name="spotPriorityProfile") + spot_priority_profile: Optional["_models.SpotPriorityProfile"] = rest_field( + name="spotPriorityProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Configuration Options for Spot instances in Compute Fleet.""" - regular_priority_profile: Optional["_models.RegularPriorityProfile"] = rest_field(name="regularPriorityProfile") + regular_priority_profile: Optional["_models.RegularPriorityProfile"] = rest_field( + name="regularPriorityProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Configuration Options for Regular instances in Compute Fleet.""" - vm_sizes_profile: List["_models.VmSizeProfile"] = rest_field(name="vmSizesProfile") + vm_sizes_profile: List["_models.VmSizeProfile"] = rest_field( + name="vmSizesProfile", visibility=["read", "create", "update", "delete", "query"] + ) """List of VM sizes supported for Compute Fleet. Required.""" - vm_attributes: Optional["_models.VMAttributes"] = rest_field(name="vmAttributes") + vm_attributes: Optional["_models.VMAttributes"] = rest_field( + name="vmAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """Attribute based Fleet.""" additional_locations_profile: Optional["_models.AdditionalLocationsProfile"] = rest_field( - name="additionalLocationsProfile" + name="additionalLocationsProfile", visibility=["read", "create", "update", "delete", "query"] ) """Represents the configuration for additional locations where Fleet resources may be deployed.""" - compute_profile: "_models.ComputeProfile" = rest_field(name="computeProfile") + compute_profile: "_models.ComputeProfile" = rest_field( + name="computeProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Compute Profile to use for running user's workloads. Required.""" time_created: Optional[datetime.datetime] = rest_field(name="timeCreated", visibility=["read"], format="rfc3339") """Specifies the time at which the Compute Fleet is created.""" @@ -1034,16 +1105,16 @@ def __init__( regular_priority_profile: Optional["_models.RegularPriorityProfile"] = None, vm_attributes: Optional["_models.VMAttributes"] = None, additional_locations_profile: Optional["_models.AdditionalLocationsProfile"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1060,13 +1131,19 @@ class FleetUpdate(_model_base.Model): :vartype properties: ~azure.mgmt.computefleet.models.FleetProperties """ - tags: Optional[Dict[str, str]] = rest_field() + tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" - identity: Optional["_models.ManagedServiceIdentityUpdate"] = rest_field() + identity: Optional["_models.ManagedServiceIdentityUpdate"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Updatable managed service identity.""" - plan: Optional["_models.ResourcePlanUpdate"] = rest_field() + plan: Optional["_models.ResourcePlanUpdate"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Updatable resource plan.""" - properties: Optional["_models.FleetProperties"] = rest_field() + properties: Optional["_models.FleetProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """RP-specific updatable properties.""" @overload @@ -1077,16 +1154,16 @@ def __init__( identity: Optional["_models.ManagedServiceIdentityUpdate"] = None, plan: Optional["_models.ResourcePlanUpdate"] = None, properties: Optional["_models.FleetProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1116,7 +1193,7 @@ class ImageReference(_model_base.Model): becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input. :vartype version: str :ivar exact_version: Specifies in decimal numbers, the version of platform image or marketplace @@ -1133,16 +1210,16 @@ class ImageReference(_model_base.Model): :vartype community_gallery_image_id: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource Id.""" - publisher: Optional[str] = rest_field() + publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The image publisher.""" - offer: Optional[str] = rest_field() + offer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the offer of the platform image or marketplace image used to create the virtual machine.""" - sku: Optional[str] = rest_field() + sku: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The image SKU.""" - version: Optional[str] = rest_field() + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest @@ -1151,16 +1228,20 @@ class ImageReference(_model_base.Model): becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.""" exact_version: Optional[str] = rest_field(name="exactVersion", visibility=["read"]) """Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.""" - shared_gallery_image_id: Optional[str] = rest_field(name="sharedGalleryImageId") + shared_gallery_image_id: Optional[str] = rest_field( + name="sharedGalleryImageId", visibility=["read", "create", "update", "delete", "query"] + ) """Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.""" - community_gallery_image_id: Optional[str] = rest_field(name="communityGalleryImageId") + community_gallery_image_id: Optional[str] = rest_field( + name="communityGalleryImageId", visibility=["read", "create", "update", "delete", "query"] + ) """Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.""" @@ -1175,16 +1256,16 @@ def __init__( version: Optional[str] = None, shared_gallery_image_id: Optional[str] = None, community_gallery_image_id: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1197,9 +1278,13 @@ class InnerError(_model_base.Model): :vartype error_detail: str """ - exception_type: Optional[str] = rest_field(name="exceptionType") + exception_type: Optional[str] = rest_field( + name="exceptionType", visibility=["read", "create", "update", "delete", "query"] + ) """The exception type.""" - error_detail: Optional[str] = rest_field(name="errorDetail") + error_detail: Optional[str] = rest_field( + name="errorDetail", visibility=["read", "create", "update", "delete", "query"] + ) """The internal error message or exception dump.""" @overload @@ -1208,16 +1293,16 @@ def __init__( *, exception_type: Optional[str] = None, error_detail: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1231,9 +1316,11 @@ class KeyVaultSecretReference(_model_base.Model): :vartype source_vault: ~azure.mgmt.computefleet.models.SubResource """ - secret_url: str = rest_field(name="secretUrl") + secret_url: str = rest_field(name="secretUrl", visibility=["read", "create", "update", "delete", "query"]) """The URL referencing a secret in a Key Vault. Required.""" - source_vault: "_models.SubResource" = rest_field(name="sourceVault") + source_vault: "_models.SubResource" = rest_field( + name="sourceVault", visibility=["read", "create", "update", "delete", "query"] + ) """The relative URL of the Key Vault containing the secret. Required.""" @overload @@ -1242,23 +1329,23 @@ def __init__( *, secret_url: str, source_vault: "_models.SubResource", - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class LinuxConfiguration(_model_base.Model): """Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see `Linux on Azure-Endorsed - Distributions `_. + Distributions `_. :ivar disable_password_authentication: Specifies whether password authentication should be disabled. @@ -1280,18 +1367,26 @@ class LinuxConfiguration(_model_base.Model): :vartype enable_vm_agent_platform_updates: bool """ - disable_password_authentication: Optional[bool] = rest_field(name="disablePasswordAuthentication") + disable_password_authentication: Optional[bool] = rest_field( + name="disablePasswordAuthentication", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether password authentication should be disabled.""" - ssh: Optional["_models.SshConfiguration"] = rest_field() + ssh: Optional["_models.SshConfiguration"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the ssh key configuration for a Linux OS.""" - provision_vm_agent: Optional[bool] = rest_field(name="provisionVMAgent") + provision_vm_agent: Optional[bool] = rest_field( + name="provisionVMAgent", visibility=["read", "create", "update", "delete", "query"] + ) """Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.""" - patch_settings: Optional["_models.LinuxPatchSettings"] = rest_field(name="patchSettings") + patch_settings: Optional["_models.LinuxPatchSettings"] = rest_field( + name="patchSettings", visibility=["read", "create", "update", "delete", "query"] + ) """[Preview Feature] Specifies settings related to VM Guest Patching on Linux.""" - enable_vm_agent_platform_updates: Optional[bool] = rest_field(name="enableVMAgentPlatformUpdates") + enable_vm_agent_platform_updates: Optional[bool] = rest_field( + name="enableVMAgentPlatformUpdates", visibility=["read", "create", "update", "delete", "query"] + ) """Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false.""" @@ -1304,16 +1399,16 @@ def __init__( provision_vm_agent: Optional[bool] = None, patch_settings: Optional["_models.LinuxPatchSettings"] = None, enable_vm_agent_platform_updates: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1322,17 +1417,17 @@ class LinuxPatchSettings(_model_base.Model): :ivar patch_mode: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as - Flexible.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` - **ImageDefault** - The - virtual machine's default patching configuration is used. :code:`
`:code:`
` + Flexible.\\ :code:`
`\\ :code:`
` Possible values are:\\ :code:`
`\\ :code:`
` **ImageDefault** - The + virtual machine's default patching configuration is used. :code:`
`\\ :code:`
` **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true. Known values are: "ImageDefault" and "AutomaticByPlatform". :vartype patch_mode: str or ~azure.mgmt.computefleet.models.LinuxVMGuestPatchMode :ivar assessment_mode: Specifies the mode of VM Guest Patch Assessment for the IaaS virtual - machine.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` - **ImageDefault** - You - control the timing of patch assessments on a virtual machine. :code:`
`:code:`
` + machine.\\ :code:`
`\\ :code:`
` Possible values are:\\ :code:`
`\\ :code:`
` **ImageDefault** - You + control the timing of patch assessments on a virtual machine. :code:`
`\\ :code:`
` **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Known values are: "ImageDefault" and "AutomaticByPlatform". @@ -1344,25 +1439,29 @@ class LinuxPatchSettings(_model_base.Model): ~azure.mgmt.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformSettings """ - patch_mode: Optional[Union[str, "_models.LinuxVMGuestPatchMode"]] = rest_field(name="patchMode") + patch_mode: Optional[Union[str, "_models.LinuxVMGuestPatchMode"]] = rest_field( + name="patchMode", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as - Flexible.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` + Flexible.\ :code:`
`\ :code:`
` Possible values are:\ :code:`
`\ :code:`
` **ImageDefault** - The - virtual machine's default patching configuration is used. :code:`
`:code:`
` + virtual machine's default patching configuration is used. :code:`
`\ :code:`
` **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true. Known values are: \"ImageDefault\" and \"AutomaticByPlatform\".""" - assessment_mode: Optional[Union[str, "_models.LinuxPatchAssessmentMode"]] = rest_field(name="assessmentMode") + assessment_mode: Optional[Union[str, "_models.LinuxPatchAssessmentMode"]] = rest_field( + name="assessmentMode", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the mode of VM Guest Patch Assessment for the IaaS virtual - machine.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` + machine.\ :code:`
`\ :code:`
` Possible values are:\ :code:`
`\ :code:`
` **ImageDefault** - You - control the timing of patch assessments on a virtual machine. :code:`
`:code:`
` + control the timing of patch assessments on a virtual machine. :code:`
`\ :code:`
` **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Known values are: \"ImageDefault\" and \"AutomaticByPlatform\".""" automatic_by_platform_settings: Optional["_models.LinuxVMGuestPatchAutomaticByPlatformSettings"] = rest_field( - name="automaticByPlatformSettings" + name="automaticByPlatformSettings", visibility=["read", "create", "update", "delete", "query"] ) """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux.""" @@ -1374,16 +1473,16 @@ def __init__( patch_mode: Optional[Union[str, "_models.LinuxVMGuestPatchMode"]] = None, assessment_mode: Optional[Union[str, "_models.LinuxPatchAssessmentMode"]] = None, automatic_by_platform_settings: Optional["_models.LinuxVMGuestPatchAutomaticByPlatformSettings"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1402,12 +1501,12 @@ class LinuxVMGuestPatchAutomaticByPlatformSettings(_model_base.Model): # pylint """ reboot_setting: Optional[Union[str, "_models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting"]] = rest_field( - name="rebootSetting" + name="rebootSetting", visibility=["read", "create", "update", "delete", "query"] ) """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\".""" bypass_platform_safety_checks_on_user_schedule: Optional[bool] = rest_field( - name="bypassPlatformSafetyChecksOnUserSchedule" + name="bypassPlatformSafetyChecksOnUserSchedule", visibility=["read", "create", "update", "delete", "query"] ) """Enables customer to schedule patching without accidental upgrades.""" @@ -1417,16 +1516,16 @@ def __init__( *, reboot_setting: Optional[Union[str, "_models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting"]] = None, bypass_platform_safety_checks_on_user_schedule: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1446,11 +1545,11 @@ class LocationProfile(_model_base.Model): ~azure.mgmt.computefleet.models.BaseVirtualMachineProfile """ - location: str = rest_field() + location: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The ARM location name of the additional region. If LocationProfile is specified, then location is required. Required.""" virtual_machine_profile_override: Optional["_models.BaseVirtualMachineProfile"] = rest_field( - name="virtualMachineProfileOverride" + name="virtualMachineProfileOverride", visibility=["read", "create", "update", "delete", "query"] ) """An override for computeProfile.baseVirtualMachineProfile specific to this region. This override is merged with the base virtual machine profile to define the final virtual @@ -1462,16 +1561,16 @@ def __init__( *, location: str, virtual_machine_profile_override: Optional["_models.BaseVirtualMachineProfile"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1501,11 +1600,13 @@ class ManagedServiceIdentity(_model_base.Model): tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) """The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.""" - type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field() + type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The type of managed identity assigned to this resource. Required. Known values are: \"None\", \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = rest_field( - name="userAssignedIdentities" + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] ) """The identities assigned to this resource by the user.""" @@ -1515,16 +1616,16 @@ def __init__( *, type: Union[str, "_models.ManagedServiceIdentityType"], user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1539,11 +1640,13 @@ class ManagedServiceIdentityUpdate(_model_base.Model): ~azure.mgmt.computefleet.models.UserAssignedIdentity] """ - type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = rest_field() + type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The type of managed identity assigned to this resource. Known values are: \"None\", \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = rest_field( - name="userAssignedIdentities" + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] ) """The identities assigned to this resource by the user.""" @@ -1553,16 +1656,16 @@ def __init__( *, type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = None, user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1595,13 +1698,15 @@ class Operation(_model_base.Model): is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.""" - display: Optional["_models.OperationDisplay"] = rest_field(visibility=["read"]) + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Localized display information for this particular operation.""" origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and \"user,system\".""" - action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType") + action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \"Internal\"""" @@ -1609,17 +1714,17 @@ class Operation(_model_base.Model): def __init__( self, *, - action_type: Optional[Union[str, "_models.ActionType"]] = None, - ): ... + display: Optional["_models.OperationDisplay"] = None, + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1669,12 +1774,14 @@ class OSImageNotificationProfile(_model_base.Model): :vartype enable: bool """ - not_before_timeout: Optional[str] = rest_field(name="notBeforeTimeout") + not_before_timeout: Optional[str] = rest_field( + name="notBeforeTimeout", visibility=["read", "create", "update", "delete", "query"] + ) """Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, and the value must not exceed 15 minutes (PT15M).""" - enable: Optional[bool] = rest_field() + enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies whether the OS Image Scheduled event is enabled or disabled.""" @overload @@ -1683,16 +1790,16 @@ def __init__( *, not_before_timeout: Optional[str] = None, enable: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1701,15 +1808,16 @@ class PatchSettings(_model_base.Model): :ivar patch_mode: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as - Flexible.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` - **Manual** - You + Flexible.\\ :code:`
`\\ :code:`
` Possible values are:\\ :code:`
`\\ :code:`
` **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be - false:code:`
`:code:`
` **AutomaticByOS** - The virtual machine will automatically - be + false\\ :code:`
`\\ :code:`
` **AutomaticByOS** - The virtual machine will + automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates - must be true. :code:`
`:code:`
` **AutomaticByPlatform** - the virtual machine will + must be true. :code:`
`\\ :code:`
` **AutomaticByPlatform** - the virtual machine + will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Known values are: "Manual", "AutomaticByOS", and "AutomaticByPlatform". @@ -1720,9 +1828,9 @@ class PatchSettings(_model_base.Model): must be set to 'AutomaticByPlatform'. :vartype enable_hotpatching: bool :ivar assessment_mode: Specifies the mode of VM Guest patch assessment for the IaaS virtual - machine.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` - **ImageDefault** - You - control the timing of patch assessments on a virtual machine.:code:`
`:code:`
` + machine.\\ :code:`
`\\ :code:`
` Possible values are:\\ :code:`
`\\ :code:`
` **ImageDefault** - You + control the timing of patch assessments on a virtual machine.\\ :code:`
`\\ :code:`
` **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Known values are: "ImageDefault" and "AutomaticByPlatform". @@ -1734,34 +1842,41 @@ class PatchSettings(_model_base.Model): ~azure.mgmt.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformSettings """ - patch_mode: Optional[Union[str, "_models.WindowsVMGuestPatchMode"]] = rest_field(name="patchMode") + patch_mode: Optional[Union[str, "_models.WindowsVMGuestPatchMode"]] = rest_field( + name="patchMode", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as - Flexible.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` + Flexible.\ :code:`
`\ :code:`
` Possible values are:\ :code:`
`\ :code:`
` **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be - false:code:`
`:code:`
` **AutomaticByOS** - The virtual machine will automatically be + false\ :code:`
`\ :code:`
` **AutomaticByOS** - The virtual machine will + automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates - must be true. :code:`
`:code:`
` **AutomaticByPlatform** - the virtual machine will + must be true. :code:`
`\ :code:`
` **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Known values are: \"Manual\", \"AutomaticByOS\", and \"AutomaticByPlatform\".""" - enable_hotpatching: Optional[bool] = rest_field(name="enableHotpatching") + enable_hotpatching: Optional[bool] = rest_field( + name="enableHotpatching", visibility=["read", "create", "update", "delete", "query"] + ) """Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'.""" - assessment_mode: Optional[Union[str, "_models.WindowsPatchAssessmentMode"]] = rest_field(name="assessmentMode") + assessment_mode: Optional[Union[str, "_models.WindowsPatchAssessmentMode"]] = rest_field( + name="assessmentMode", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the mode of VM Guest patch assessment for the IaaS virtual - machine.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` + machine.\ :code:`
`\ :code:`
` Possible values are:\ :code:`
`\ :code:`
` **ImageDefault** - You - control the timing of patch assessments on a virtual machine.:code:`
`:code:`
` + control the timing of patch assessments on a virtual machine.\ :code:`
`\ :code:`
` **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Known values are: \"ImageDefault\" and \"AutomaticByPlatform\".""" automatic_by_platform_settings: Optional["_models.WindowsVMGuestPatchAutomaticByPlatformSettings"] = rest_field( - name="automaticByPlatformSettings" + name="automaticByPlatformSettings", visibility=["read", "create", "update", "delete", "query"] ) """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.""" @@ -1774,16 +1889,16 @@ def __init__( enable_hotpatching: Optional[bool] = None, assessment_mode: Optional[Union[str, "_models.WindowsPatchAssessmentMode"]] = None, automatic_by_platform_settings: Optional["_models.WindowsVMGuestPatchAutomaticByPlatformSettings"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1806,17 +1921,19 @@ class Plan(_model_base.Model): :vartype version: str """ - name: str = rest_field() + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A user defined name of the 3rd Party Artifact that is being procured. Required.""" - publisher: str = rest_field() + publisher: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. Required.""" - product: str = rest_field() + product: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. Required.""" - promotion_code: Optional[str] = rest_field(name="promotionCode") + promotion_code: Optional[str] = rest_field( + name="promotionCode", visibility=["read", "create", "update", "delete", "query"] + ) """A publisher provided promotion code as provisioned in Data Market for the said product/artifact.""" - version: Optional[str] = rest_field() + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the desired product/artifact.""" @overload @@ -1828,16 +1945,16 @@ def __init__( product: str, promotion_code: Optional[str] = None, version: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1859,15 +1976,17 @@ class ProxyAgentSettings(_model_base.Model): :vartype key_incarnation_id: int """ - enabled: Optional[bool] = rest_field() + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set.""" - mode: Optional[Union[str, "_models.Mode"]] = rest_field() + mode: Optional[Union[str, "_models.Mode"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will start to audit or monitor but not enforce access control over requests to host endpoints in Audit mode, while in Enforce mode it will enforce access control. The default value is Enforce mode. Known values are: \"Audit\" and \"Enforce\".""" - key_incarnation_id: Optional[int] = rest_field(name="keyIncarnationId") + key_incarnation_id: Optional[int] = rest_field( + name="keyIncarnationId", visibility=["read", "create", "update", "delete", "query"] + ) """Increase the value of this property allows user to reset the key used for securing communication channel between guest and host.""" @@ -1878,16 +1997,16 @@ def __init__( enabled: Optional[bool] = None, mode: Optional[Union[str, "_models.Mode"]] = None, key_incarnation_id: Optional[int] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1901,9 +2020,13 @@ class PublicIPAddressSku(_model_base.Model): :vartype tier: str or ~azure.mgmt.computefleet.models.PublicIPAddressSkuTier """ - name: Optional[Union[str, "_models.PublicIPAddressSkuName"]] = rest_field() + name: Optional[Union[str, "_models.PublicIPAddressSkuName"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specify public IP sku name. Known values are: \"Basic\" and \"Standard\".""" - tier: Optional[Union[str, "_models.PublicIPAddressSkuTier"]] = rest_field() + tier: Optional[Union[str, "_models.PublicIPAddressSkuTier"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specify public IP sku tier. Known values are: \"Regional\" and \"Global\".""" @overload @@ -1912,16 +2035,16 @@ def __init__( *, name: Optional[Union[str, "_models.PublicIPAddressSkuName"]] = None, tier: Optional[Union[str, "_models.PublicIPAddressSkuTier"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1939,13 +2062,15 @@ class RegularPriorityProfile(_model_base.Model): ~azure.mgmt.computefleet.models.RegularPriorityAllocationStrategy """ - capacity: Optional[int] = rest_field() + capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Total capacity to achieve. It is currently in terms of number of VMs.""" - min_capacity: Optional[int] = rest_field(name="minCapacity") + min_capacity: Optional[int] = rest_field( + name="minCapacity", visibility=["read", "create", "update", "delete", "query"] + ) """Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.""" allocation_strategy: Optional[Union[str, "_models.RegularPriorityAllocationStrategy"]] = rest_field( - name="allocationStrategy" + name="allocationStrategy", visibility=["read", "create", "update", "delete", "query"] ) """Allocation strategy to follow when determining the VM sizes distribution for Regular VMs. Known values are: \"LowestPrice\" and \"Prioritized\".""" @@ -1957,16 +2082,16 @@ def __init__( capacity: Optional[int] = None, min_capacity: Optional[int] = None, allocation_strategy: Optional[Union[str, "_models.RegularPriorityAllocationStrategy"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1987,17 +2112,19 @@ class ResourcePlanUpdate(_model_base.Model): :vartype version: str """ - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A user defined name of the 3rd Party Artifact that is being procured.""" - publisher: Optional[str] = rest_field() + publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic.""" - product: Optional[str] = rest_field() + product: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.""" - promotion_code: Optional[str] = rest_field(name="promotionCode") + promotion_code: Optional[str] = rest_field( + name="promotionCode", visibility=["read", "create", "update", "delete", "query"] + ) """A publisher provided promotion code as provisioned in Data Market for the said product/artifact.""" - version: Optional[str] = rest_field() + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the desired product/artifact.""" @overload @@ -2009,16 +2136,16 @@ def __init__( product: Optional[str] = None, promotion_code: Optional[str] = None, version: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2035,11 +2162,11 @@ class ScheduledEventsProfile(_model_base.Model): """ terminate_notification_profile: Optional["_models.TerminateNotificationProfile"] = rest_field( - name="terminateNotificationProfile" + name="terminateNotificationProfile", visibility=["read", "create", "update", "delete", "query"] ) """Specifies Terminate Scheduled Event related configurations.""" os_image_notification_profile: Optional["_models.OSImageNotificationProfile"] = rest_field( - name="osImageNotificationProfile" + name="osImageNotificationProfile", visibility=["read", "create", "update", "delete", "query"] ) """Specifies OS Image Scheduled Event related configurations.""" @@ -2049,16 +2176,16 @@ def __init__( *, terminate_notification_profile: Optional["_models.TerminateNotificationProfile"] = None, os_image_notification_profile: Optional["_models.OSImageNotificationProfile"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2067,7 +2194,7 @@ class SecurityPostureReference(_model_base.Model): set. Minimum api-version: 2023-03-01. :ivar id: The security posture reference id in the form of - /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest. # pylint: disable=line-too-long + /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest. :vartype id: str :ivar exclude_extensions: List of virtual machine extension names to exclude when applying the security @@ -2077,13 +2204,17 @@ class SecurityPostureReference(_model_base.Model): :vartype is_overridable: bool """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The security posture reference id in the form of - /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest. # pylint: disable=line-too-long""" - exclude_extensions: Optional[List[str]] = rest_field(name="excludeExtensions") + /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest.""" + exclude_extensions: Optional[List[str]] = rest_field( + name="excludeExtensions", visibility=["read", "create", "update", "delete", "query"] + ) """List of virtual machine extension names to exclude when applying the security posture.""" - is_overridable: Optional[bool] = rest_field(name="isOverridable") + is_overridable: Optional[bool] = rest_field( + name="isOverridable", visibility=["read", "create", "update", "delete", "query"] + ) """Whether the security posture can be overridden by the user.""" @overload @@ -2093,16 +2224,16 @@ def __init__( id: Optional[str] = None, # pylint: disable=redefined-builtin exclude_extensions: Optional[List[str]] = None, is_overridable: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2136,24 +2267,34 @@ class SecurityProfile(_model_base.Model): :vartype proxy_agent_settings: ~azure.mgmt.computefleet.models.ProxyAgentSettings """ - uefi_settings: Optional["_models.UefiSettings"] = rest_field(name="uefiSettings") + uefi_settings: Optional["_models.UefiSettings"] = rest_field( + name="uefiSettings", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01.""" - encryption_at_host: Optional[bool] = rest_field(name="encryptionAtHost") + encryption_at_host: Optional[bool] = rest_field( + name="encryptionAtHost", visibility=["read", "create", "update", "delete", "query"] + ) """This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource.""" - security_type: Optional[Union[str, "_models.SecurityTypes"]] = rest_field(name="securityType") + security_type: Optional[Union[str, "_models.SecurityTypes"]] = rest_field( + name="securityType", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. Known values are: \"TrustedLaunch\" and \"ConfidentialVM\".""" - encryption_identity: Optional["_models.EncryptionIdentity"] = rest_field(name="encryptionIdentity") + encryption_identity: Optional["_models.EncryptionIdentity"] = rest_field( + name="encryptionIdentity", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the Managed Identity used by ADE to get access token for keyvault operations.""" - proxy_agent_settings: Optional["_models.ProxyAgentSettings"] = rest_field(name="proxyAgentSettings") + proxy_agent_settings: Optional["_models.ProxyAgentSettings"] = rest_field( + name="proxyAgentSettings", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2023-09-01.""" @@ -2166,16 +2307,16 @@ def __init__( security_type: Optional[Union[str, "_models.SecurityTypes"]] = None, encryption_identity: Optional["_models.EncryptionIdentity"] = None, proxy_agent_settings: Optional["_models.ProxyAgentSettings"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2185,29 +2326,29 @@ class ServiceArtifactReference(_model_base.Model): Minimum api-version: 2022-11-01. :ivar id: The service artifact reference id in the form of - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. :vartype id: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The service artifact reference id in the form of - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. # pylint: disable=line-too-long""" + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}.""" @overload def __init__( self, *, id: Optional[str] = None, # pylint: disable=redefined-builtin - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2238,20 +2379,28 @@ class SpotPriorityProfile(_model_base.Model): :vartype maintain: bool """ - capacity: Optional[int] = rest_field() + capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Total capacity to achieve. It is currently in terms of number of VMs.""" - min_capacity: Optional[int] = rest_field(name="minCapacity") + min_capacity: Optional[int] = rest_field( + name="minCapacity", visibility=["read", "create", "update", "delete", "query"] + ) """Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.""" - max_price_per_vm: Optional[float] = rest_field(name="maxPricePerVM") + max_price_per_vm: Optional[float] = rest_field( + name="maxPricePerVM", visibility=["read", "create", "update", "delete", "query"] + ) """Price per hour of each Spot VM will never exceed this.""" - eviction_policy: Optional[Union[str, "_models.EvictionPolicy"]] = rest_field(name="evictionPolicy") + eviction_policy: Optional[Union[str, "_models.EvictionPolicy"]] = rest_field( + name="evictionPolicy", visibility=["read", "create", "update", "delete", "query"] + ) """Eviction Policy to follow when evicting Spot VMs. Known values are: \"Delete\" and \"Deallocate\".""" - allocation_strategy: Optional[Union[str, "_models.SpotAllocationStrategy"]] = rest_field(name="allocationStrategy") + allocation_strategy: Optional[Union[str, "_models.SpotAllocationStrategy"]] = rest_field( + name="allocationStrategy", visibility=["read", "create", "update", "delete", "query"] + ) """Allocation strategy to follow when determining the VM sizes distribution for Spot VMs. Known values are: \"PriceCapacityOptimized\", \"LowestPrice\", and \"CapacityOptimized\".""" - maintain: Optional[bool] = rest_field() + maintain: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs. If maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs @@ -2270,16 +2419,16 @@ def __init__( eviction_policy: Optional[Union[str, "_models.EvictionPolicy"]] = None, allocation_strategy: Optional[Union[str, "_models.SpotAllocationStrategy"]] = None, maintain: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2290,7 +2439,9 @@ class SshConfiguration(_model_base.Model): :vartype public_keys: list[~azure.mgmt.computefleet.models.SshPublicKey] """ - public_keys: Optional[List["_models.SshPublicKey"]] = rest_field(name="publicKeys") + public_keys: Optional[List["_models.SshPublicKey"]] = rest_field( + name="publicKeys", visibility=["read", "create", "update", "delete", "query"] + ) """The list of SSH public keys used to authenticate with linux based VMs.""" @overload @@ -2298,16 +2449,16 @@ def __init__( self, *, public_keys: Optional[List["_models.SshPublicKey"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2322,19 +2473,19 @@ class SshPublicKey(_model_base.Model): :ivar key_data: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in - Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). :vartype key_data: str """ - path: Optional[str] = rest_field() + path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys.""" - key_data: Optional[str] = rest_field(name="keyData") + key_data: Optional[str] = rest_field(name="keyData", visibility=["read", "create", "update", "delete", "query"]) """SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in - Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).""" + Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).""" @overload def __init__( @@ -2342,16 +2493,16 @@ def __init__( *, path: Optional[str] = None, key_data: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2362,7 +2513,7 @@ class SubResource(_model_base.Model): :vartype id: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource Id.""" @overload @@ -2370,16 +2521,16 @@ def __init__( self, *, id: Optional[str] = None, # pylint: disable=redefined-builtin - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2402,19 +2553,29 @@ class SystemData(_model_base.Model): :vartype last_modified_at: ~datetime.datetime """ - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The identity that created the resource.""" - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="createdByType") + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that created the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - created_at: Optional[datetime.datetime] = rest_field(name="createdAt", format="rfc3339") + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource creation (UTC).""" - last_modified_by: Optional[str] = rest_field(name="lastModifiedBy") + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) """The identity that last modified the resource.""" - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="lastModifiedByType") + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that last modified the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - last_modified_at: Optional[datetime.datetime] = rest_field(name="lastModifiedAt", format="rfc3339") + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource last modification (UTC).""" @overload @@ -2427,16 +2588,16 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2453,12 +2614,14 @@ class TerminateNotificationProfile(_model_base.Model): :vartype enable: bool """ - not_before_timeout: Optional[str] = rest_field(name="notBeforeTimeout") + not_before_timeout: Optional[str] = rest_field( + name="notBeforeTimeout", visibility=["read", "create", "update", "delete", "query"] + ) """Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M).""" - enable: Optional[bool] = rest_field() + enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies whether the Terminate Scheduled event is enabled or disabled.""" @overload @@ -2467,16 +2630,16 @@ def __init__( *, not_before_timeout: Optional[str] = None, enable: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2493,10 +2656,14 @@ class UefiSettings(_model_base.Model): :vartype v_tpm_enabled: bool """ - secure_boot_enabled: Optional[bool] = rest_field(name="secureBootEnabled") + secure_boot_enabled: Optional[bool] = rest_field( + name="secureBootEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01.""" - v_tpm_enabled: Optional[bool] = rest_field(name="vTpmEnabled") + v_tpm_enabled: Optional[bool] = rest_field( + name="vTpmEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01.""" @@ -2506,16 +2673,16 @@ def __init__( *, secure_boot_enabled: Optional[bool] = None, v_tpm_enabled: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2524,16 +2691,16 @@ class UserAssignedIdentity(_model_base.Model): Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal ID of the assigned identity. - :vartype principal_id: str :ivar client_id: The client ID of the assigned identity. :vartype client_id: str + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str """ - principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) - """The principal ID of the assigned identity.""" client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) """The client ID of the assigned identity.""" + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal ID of the assigned identity.""" class VaultCertificate(_model_base.Model): @@ -2544,17 +2711,18 @@ class VaultCertificate(_model_base.Model): a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key - vault `_. + vault `_. In this case, your certificate needs to be It is the Base64 encoding of the - following JSON Object which is encoded in UTF-8: :code:`
`:code:`
` {:code:`
` - "data":":code:``",:code:`
` "dataType":"pfx",:code:`
` - "password":":code:``":code:`
`} :code:`
` To install certificates on - a virtual + following JSON Object which is encoded in UTF-8: :code:`
`\\ :code:`
` {\\ :code:`
` + "data":"\\ :code:``",\\ :code:`
` "dataType":"pfx",\\ + :code:`
` + "password":"\\ :code:``"\\ :code:`
`} :code:`
` To install + certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine extension for - Linux `_ + Linux `_ or the `Azure Key Vault virtual machine extension for - Windows `_. + Windows `_. :vartype certificate_url: str :ivar certificate_store: For Windows VMs, specifies the certificate store on the Virtual Machine to @@ -2567,23 +2735,27 @@ class VaultCertificate(_model_base.Model): :vartype certificate_store: str """ - certificate_url: Optional[str] = rest_field(name="certificateUrl") + certificate_url: Optional[str] = rest_field( + name="certificateUrl", visibility=["read", "create", "update", "delete", "query"] + ) """This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key - vault `_. + vault `_. In this case, your certificate needs to be It is the Base64 encoding of the - following JSON Object which is encoded in UTF-8: :code:`
`:code:`
` {:code:`
` - \"data\":\":code:``\",:code:`
` - \"dataType\":\"pfx\",:code:`
` - \"password\":\":code:``\":code:`
`} :code:`
` To install certificates - on a virtual + following JSON Object which is encoded in UTF-8: :code:`
`\ :code:`
` {\ :code:`
` + \"data\":\"\ :code:``\",\ :code:`
` \"dataType\":\"pfx\",\ + :code:`
` + \"password\":\"\ :code:``\"\ :code:`
`} :code:`
` To install + certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine extension for - Linux `_ + Linux `_ or the `Azure Key Vault virtual machine extension for - Windows `_.""" - certificate_store: Optional[str] = rest_field(name="certificateStore") + Windows `_.""" + certificate_store: Optional[str] = rest_field( + name="certificateStore", visibility=["read", "create", "update", "delete", "query"] + ) """For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is @@ -2598,16 +2770,16 @@ def __init__( *, certificate_url: Optional[str] = None, certificate_store: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2622,10 +2794,14 @@ class VaultSecretGroup(_model_base.Model): :vartype vault_certificates: list[~azure.mgmt.computefleet.models.VaultCertificate] """ - source_vault: Optional["_models.SubResource"] = rest_field(name="sourceVault") + source_vault: Optional["_models.SubResource"] = rest_field( + name="sourceVault", visibility=["read", "create", "update", "delete", "query"] + ) """The relative URL of the Key Vault containing all of the certificates in VaultCertificates.""" - vault_certificates: Optional[List["_models.VaultCertificate"]] = rest_field(name="vaultCertificates") + vault_certificates: Optional[List["_models.VaultCertificate"]] = rest_field( + name="vaultCertificates", visibility=["read", "create", "update", "delete", "query"] + ) """The list of key vault references in SourceVault which contain certificates.""" @overload @@ -2634,16 +2810,16 @@ def __init__( *, source_vault: Optional["_models.SubResource"] = None, vault_certificates: Optional[List["_models.VaultCertificate"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2654,7 +2830,7 @@ class VirtualHardDisk(_model_base.Model): :vartype uri: str """ - uri: Optional[str] = rest_field() + uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the virtual hard disk's uri.""" @overload @@ -2662,16 +2838,16 @@ def __init__( self, *, uri: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2682,7 +2858,7 @@ class VirtualMachineScaleSet(_model_base.Model): :ivar id: The compute RP resource id of the virtualMachineScaleSet - "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}". + "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}". Required. :vartype id: str :ivar type: Type of the virtualMachineScaleSet. @@ -2751,54 +2927,72 @@ class VirtualMachineScaleSetDataDisk(_model_base.Model): :vartype disk_m_bps_read_write: int :ivar delete_option: Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode - only).:code:`
`:code:`
` Possible values: :code:`
`:code:`
` **Delete** If this - value is used, the - data disk is deleted when the VMSS Flex VM is deleted.:code:`
`:code:`
` **Detach** If + only).\\ :code:`
`\\ :code:`
` Possible values: :code:`
`\\ :code:`
` **Delete** If + this value is used, the + data disk is deleted when the VMSS Flex VM is deleted.\\ :code:`
`\\ :code:`
` **Detach** + If this value is used, the data disk is retained after VMSS Flex VM is - deleted.:code:`
`:code:`
` The default value is set to **Delete**. Known values are: - "Delete" and "Detach". + deleted.\\ :code:`
`\\ :code:`
` The default value is set to **Delete**. Known values + are: "Delete" and "Detach". :vartype delete_option: str or ~azure.mgmt.computefleet.models.DiskDeleteOptionTypes """ - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The disk name.""" - lun: int = rest_field() + lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. Required.""" - caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field() + caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. Known values are: \"None\", \"ReadOnly\", and \"ReadWrite\".""" - write_accelerator_enabled: Optional[bool] = rest_field(name="writeAcceleratorEnabled") + write_accelerator_enabled: Optional[bool] = rest_field( + name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether writeAccelerator should be enabled or disabled on the disk.""" - create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field(name="createOption") + create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field( + name="createOption", visibility=["read", "create", "update", "delete", "query"] + ) """The create option. Required. Known values are: \"FromImage\", \"Empty\", \"Attach\", \"Copy\", and \"Restore\".""" - disk_size_gb: Optional[int] = rest_field(name="diskSizeGB") + disk_size_gb: Optional[int] = rest_field( + name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.""" - managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = rest_field(name="managedDisk") + managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = rest_field( + name="managedDisk", visibility=["read", "create", "update", "delete", "query"] + ) """The managed disk parameters.""" - disk_iops_read_write: Optional[int] = rest_field(name="diskIOPSReadWrite") + disk_iops_read_write: Optional[int] = rest_field( + name="diskIOPSReadWrite", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.""" - disk_m_bps_read_write: Optional[int] = rest_field(name="diskMBpsReadWrite") + disk_m_bps_read_write: Optional[int] = rest_field( + name="diskMBpsReadWrite", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.""" - delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(name="deleteOption") + delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode - only).:code:`
`:code:`
` Possible values: :code:`
`:code:`
` **Delete** If this - value is used, the - data disk is deleted when the VMSS Flex VM is deleted.:code:`
`:code:`
` **Detach** If + only).\ :code:`
`\ :code:`
` Possible values: :code:`
`\ :code:`
` **Delete** If + this value is used, the + data disk is deleted when the VMSS Flex VM is deleted.\ :code:`
`\ :code:`
` **Detach** + If this value is used, the data disk is retained after VMSS Flex VM is - deleted.:code:`
`:code:`
` The default value is set to **Delete**. Known values are: + deleted.\ :code:`
`\ :code:`
` The default value is set to **Delete**. Known values are: \"Delete\" and \"Detach\".""" @overload @@ -2815,16 +3009,16 @@ def __init__( disk_iops_read_write: Optional[int] = None, disk_m_bps_read_write: Optional[int] = None, delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2845,11 +3039,13 @@ class VirtualMachineScaleSetExtension(_model_base.Model): id: Optional[str] = rest_field(visibility=["read"]) """Resource Id.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the extension.""" type: Optional[str] = rest_field(visibility=["read"]) """Resource type.""" - properties: Optional["_models.VirtualMachineScaleSetExtensionProperties"] = rest_field() + properties: Optional["_models.VirtualMachineScaleSetExtensionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Describes the properties of a Virtual Machine Scale Set Extension.""" @overload @@ -2858,16 +3054,16 @@ def __init__( *, name: Optional[str] = None, properties: Optional["_models.VirtualMachineScaleSetExtensionProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -2884,9 +3080,13 @@ class VirtualMachineScaleSetExtensionProfile(_model_base.Model): :vartype extensions_time_budget: str """ - extensions: Optional[List["_models.VirtualMachineScaleSetExtension"]] = rest_field() + extensions: Optional[List["_models.VirtualMachineScaleSetExtension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The virtual machine scale set child extension resources.""" - extensions_time_budget: Optional[str] = rest_field(name="extensionsTimeBudget") + extensions_time_budget: Optional[str] = rest_field( + name="extensionsTimeBudget", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). @@ -2898,22 +3098,20 @@ def __init__( *, extensions: Optional[List["_models.VirtualMachineScaleSetExtension"]] = None, extensions_time_budget: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class VirtualMachineScaleSetExtensionProperties( - _model_base.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetExtensionProperties(_model_base.Model): # pylint: disable=name-too-long """Describes the properties of a Virtual Machine Scale Set Extension. Readonly variables are only populated by the server, and will be ignored when sending a request. @@ -2961,39 +3159,51 @@ class VirtualMachineScaleSetExtensionProperties( ~azure.mgmt.computefleet.models.KeyVaultSecretReference """ - force_update_tag: Optional[str] = rest_field(name="forceUpdateTag") + force_update_tag: Optional[str] = rest_field( + name="forceUpdateTag", visibility=["read", "create", "update", "delete", "query"] + ) """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.""" - publisher: Optional[str] = rest_field() + publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the extension handler publisher.""" - type: Optional[str] = rest_field() + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the type of the extension; an example is \"CustomScriptExtension\".""" - type_handler_version: Optional[str] = rest_field(name="typeHandlerVersion") + type_handler_version: Optional[str] = rest_field( + name="typeHandlerVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the version of the script handler.""" - auto_upgrade_minor_version: Optional[bool] = rest_field(name="autoUpgradeMinorVersion") + auto_upgrade_minor_version: Optional[bool] = rest_field( + name="autoUpgradeMinorVersion", visibility=["read", "create", "update", "delete", "query"] + ) """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.""" - enable_automatic_upgrade: Optional[bool] = rest_field(name="enableAutomaticUpgrade") + enable_automatic_upgrade: Optional[bool] = rest_field( + name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"] + ) """Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.""" - settings: Optional[Dict[str, Any]] = rest_field() + settings: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Json formatted public settings for the extension.""" protected_settings: Optional[Dict[str, Any]] = rest_field(name="protectedSettings", visibility=["create", "update"]) """The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.""" provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) """The provisioning state, which only appears in the response.""" - provision_after_extensions: Optional[List[str]] = rest_field(name="provisionAfterExtensions") + provision_after_extensions: Optional[List[str]] = rest_field( + name="provisionAfterExtensions", visibility=["read", "create", "update", "delete", "query"] + ) """Collection of extension names after which this extension needs to be provisioned.""" - suppress_failures: Optional[bool] = rest_field(name="suppressFailures") + suppress_failures: Optional[bool] = rest_field( + name="suppressFailures", visibility=["read", "create", "update", "delete", "query"] + ) """Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.""" protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = rest_field( - name="protectedSettingsFromKeyVault" + name="protectedSettingsFromKeyVault", visibility=["read", "create", "update", "delete", "query"] ) """The extensions protected settings that are passed by reference, and consumed from key vault.""" @@ -3013,16 +3223,16 @@ def __init__( provision_after_extensions: Optional[List[str]] = None, suppress_failures: Optional[bool] = None, protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3036,7 +3246,9 @@ class VirtualMachineScaleSetHardwareProfile(_model_base.Model): :vartype vm_size_properties: ~azure.mgmt.computefleet.models.VMSizeProperties """ - vm_size_properties: Optional["_models.VMSizeProperties"] = rest_field(name="vmSizeProperties") + vm_size_properties: Optional["_models.VMSizeProperties"] = rest_field( + name="vmSizeProperties", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in `VM Customization `_ for more details.""" @@ -3046,16 +3258,16 @@ def __init__( self, *, vm_size_properties: Optional["_models.VMSizeProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3071,9 +3283,11 @@ class VirtualMachineScaleSetIPConfiguration(_model_base.Model): ~azure.mgmt.computefleet.models.VirtualMachineScaleSetIPConfigurationProperties """ - name: str = rest_field() + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The IP configuration name. Required.""" - properties: Optional["_models.VirtualMachineScaleSetIPConfigurationProperties"] = rest_field() + properties: Optional["_models.VirtualMachineScaleSetIPConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Describes a virtual machine scale set network profile's IP configuration properties.""" @@ -3083,16 +3297,16 @@ def __init__( *, name: str, properties: Optional["_models.VirtualMachineScaleSetIPConfigurationProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3135,36 +3349,42 @@ class VirtualMachineScaleSetIPConfigurationProperties(_model_base.Model): # pyl :vartype load_balancer_inbound_nat_pools: list[~azure.mgmt.computefleet.models.SubResource] """ - subnet: Optional["_models.ApiEntityReference"] = rest_field() + subnet: Optional["_models.ApiEntityReference"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the identifier of the subnet.""" - primary: Optional[bool] = rest_field() + primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the primary network interface in case the virtual machine has more than 1 network interface.""" public_ip_address_configuration: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfiguration"] = ( - rest_field(name="publicIPAddressConfiguration") + rest_field(name="publicIPAddressConfiguration", visibility=["read", "create", "update", "delete", "query"]) ) """The publicIPAddressConfiguration.""" - private_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = rest_field(name="privateIPAddressVersion") + private_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = rest_field( + name="privateIPAddressVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Known values are: \"IPv4\" and \"IPv6\".""" application_gateway_backend_address_pools: Optional[List["_models.SubResource"]] = rest_field( - name="applicationGatewayBackendAddressPools" + name="applicationGatewayBackendAddressPools", visibility=["read", "create", "update", "delete", "query"] ) """Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway.""" - application_security_groups: Optional[List["_models.SubResource"]] = rest_field(name="applicationSecurityGroups") + application_security_groups: Optional[List["_models.SubResource"]] = rest_field( + name="applicationSecurityGroups", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies an array of references to application security group.""" load_balancer_backend_address_pools: Optional[List["_models.SubResource"]] = rest_field( - name="loadBalancerBackendAddressPools" + name="loadBalancerBackendAddressPools", visibility=["read", "create", "update", "delete", "query"] ) """Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.""" load_balancer_inbound_nat_pools: Optional[List["_models.SubResource"]] = rest_field( - name="loadBalancerInboundNatPools" + name="loadBalancerInboundNatPools", visibility=["read", "create", "update", "delete", "query"] ) """Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load @@ -3182,16 +3402,16 @@ def __init__( application_security_groups: Optional[List["_models.SubResource"]] = None, load_balancer_backend_address_pools: Optional[List["_models.SubResource"]] = None, load_balancer_inbound_nat_pools: Optional[List["_models.SubResource"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3204,9 +3424,11 @@ class VirtualMachineScaleSetIpTag(_model_base.Model): :vartype tag: str """ - ip_tag_type: Optional[str] = rest_field(name="ipTagType") + ip_tag_type: Optional[str] = rest_field( + name="ipTagType", visibility=["read", "create", "update", "delete", "query"] + ) """IP tag type. Example: FirstPartyUsage.""" - tag: Optional[str] = rest_field() + tag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """IP tag associated with the public IP. Example: SQL, Storage etc.""" @overload @@ -3215,16 +3437,16 @@ def __init__( *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3233,9 +3455,9 @@ class VirtualMachineScaleSetManagedDiskParameters(_model_base.Model): # pylint: :ivar storage_account_type: Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can - only be used with data disks, it cannot be used with OS Disk. Known values are: - "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", - "StandardSSD_ZRS", and "PremiumV2_LRS". + only be used with data disks, it cannot be used with OS Disk. Known values are: "Standard_LRS", + "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS", and + "PremiumV2_LRS". :vartype storage_account_type: str or ~azure.mgmt.computefleet.models.StorageAccountTypes :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for the managed @@ -3245,15 +3467,21 @@ class VirtualMachineScaleSetManagedDiskParameters(_model_base.Model): # pylint: :vartype security_profile: ~azure.mgmt.computefleet.models.VMDiskSecurityProfile """ - storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = rest_field(name="storageAccountType") + storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = rest_field( + name="storageAccountType", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Known values are: \"Standard_LRS\", \"Premium_LRS\", \"StandardSSD_LRS\", \"UltraSSD_LRS\", \"Premium_ZRS\", \"StandardSSD_ZRS\", and \"PremiumV2_LRS\".""" - disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(name="diskEncryptionSet") + disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field( + name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the customer managed disk encryption set resource id for the managed disk.""" - security_profile: Optional["_models.VMDiskSecurityProfile"] = rest_field(name="securityProfile") + security_profile: Optional["_models.VMDiskSecurityProfile"] = rest_field( + name="securityProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the security profile for the managed disk.""" @overload @@ -3263,16 +3491,16 @@ def __init__( storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = None, disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None, security_profile: Optional["_models.VMDiskSecurityProfile"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3287,9 +3515,11 @@ class VirtualMachineScaleSetNetworkConfiguration(_model_base.Model): # pylint: ~azure.mgmt.computefleet.models.VirtualMachineScaleSetNetworkConfigurationProperties """ - name: str = rest_field() + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The network configuration name. Required.""" - properties: Optional["_models.VirtualMachineScaleSetNetworkConfigurationProperties"] = rest_field() + properties: Optional["_models.VirtualMachineScaleSetNetworkConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Describes a virtual machine scale set network profile's IP configuration.""" @overload @@ -3298,16 +3528,16 @@ def __init__( *, name: str, properties: Optional["_models.VirtualMachineScaleSetNetworkConfigurationProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3318,7 +3548,9 @@ class VirtualMachineScaleSetNetworkConfigurationDnsSettings(_model_base.Model): :vartype dns_servers: list[str] """ - dns_servers: Optional[List[str]] = rest_field(name="dnsServers") + dns_servers: Optional[List[str]] = rest_field( + name="dnsServers", visibility=["read", "create", "update", "delete", "query"] + ) """List of DNS servers IP addresses.""" @overload @@ -3326,22 +3558,20 @@ def __init__( self, *, dns_servers: Optional[List[str]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class VirtualMachineScaleSetNetworkConfigurationProperties( - _model_base.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetNetworkConfigurationProperties(_model_base.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's IP configuration. @@ -3377,32 +3607,50 @@ class VirtualMachineScaleSetNetworkConfigurationProperties( :vartype auxiliary_sku: str or ~azure.mgmt.computefleet.models.NetworkInterfaceAuxiliarySku """ - primary: Optional[bool] = rest_field() + primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies the primary network interface in case the virtual machine has more than 1 network interface.""" - enable_accelerated_networking: Optional[bool] = rest_field(name="enableAcceleratedNetworking") + enable_accelerated_networking: Optional[bool] = rest_field( + name="enableAcceleratedNetworking", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the network interface is accelerated networking-enabled.""" - disable_tcp_state_tracking: Optional[bool] = rest_field(name="disableTcpStateTracking") + disable_tcp_state_tracking: Optional[bool] = rest_field( + name="disableTcpStateTracking", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the network interface is disabled for tcp state tracking.""" - enable_fpga: Optional[bool] = rest_field(name="enableFpga") + enable_fpga: Optional[bool] = rest_field( + name="enableFpga", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the network interface is FPGA networking-enabled.""" - network_security_group: Optional["_models.SubResource"] = rest_field(name="networkSecurityGroup") + network_security_group: Optional["_models.SubResource"] = rest_field( + name="networkSecurityGroup", visibility=["read", "create", "update", "delete", "query"] + ) """The network security group.""" dns_settings: Optional["_models.VirtualMachineScaleSetNetworkConfigurationDnsSettings"] = rest_field( - name="dnsSettings" + name="dnsSettings", visibility=["read", "create", "update", "delete", "query"] ) """The dns settings to be applied on the network interfaces.""" - ip_configurations: List["_models.VirtualMachineScaleSetIPConfiguration"] = rest_field(name="ipConfigurations") + ip_configurations: List["_models.VirtualMachineScaleSetIPConfiguration"] = rest_field( + name="ipConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the IP configurations of the network interface. Required.""" - enable_ip_forwarding: Optional[bool] = rest_field(name="enableIPForwarding") + enable_ip_forwarding: Optional[bool] = rest_field( + name="enableIPForwarding", visibility=["read", "create", "update", "delete", "query"] + ) """Whether IP forwarding enabled on this NIC.""" - delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(name="deleteOption") + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) """Specify what happens to the network interface when the VM is deleted. Known values are: \"Delete\" and \"Detach\".""" - auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = rest_field(name="auxiliaryMode") + auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = rest_field( + name="auxiliaryMode", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the Auxiliary mode is enabled for the Network Interface resource. Known values are: \"None\", \"AcceleratedConnections\", and \"Floating\".""" - auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = rest_field(name="auxiliarySku") + auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = rest_field( + name="auxiliarySku", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the Auxiliary sku is enabled for the Network Interface resource. Known values are: \"None\", \"A1\", \"A2\", \"A4\", and \"A8\".""" @@ -3421,16 +3669,16 @@ def __init__( delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None, auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = None, auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3439,7 +3687,7 @@ class VirtualMachineScaleSetNetworkProfile(_model_base.Model): :ivar health_probe: A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. :vartype health_probe: ~azure.mgmt.computefleet.models.ApiEntityReference :ivar network_interface_configurations: The list of network configurations. :vartype network_interface_configurations: @@ -3451,15 +3699,19 @@ class VirtualMachineScaleSetNetworkProfile(_model_base.Model): :vartype network_api_version: str or ~azure.mgmt.computefleet.models.NetworkApiVersion """ - health_probe: Optional["_models.ApiEntityReference"] = rest_field(name="healthProbe") + health_probe: Optional["_models.ApiEntityReference"] = rest_field( + name="healthProbe", visibility=["read", "create", "update", "delete", "query"] + ) """A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. # pylint: disable=line-too-long""" + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.""" network_interface_configurations: Optional[List["_models.VirtualMachineScaleSetNetworkConfiguration"]] = rest_field( - name="networkInterfaceConfigurations" + name="networkInterfaceConfigurations", visibility=["read", "create", "update", "delete", "query"] ) """The list of network configurations.""" - network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = rest_field(name="networkApiVersion") + network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = rest_field( + name="networkApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) """specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'. \"2020-11-01\"""" @@ -3471,20 +3723,20 @@ def __init__( health_probe: Optional["_models.ApiEntityReference"] = None, network_interface_configurations: Optional[List["_models.VirtualMachineScaleSetNetworkConfiguration"]] = None, network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class VirtualMachineScaleSetOSDisk(_model_base.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_model_base.Model): """Describes a virtual machine scale set operating system disk. @@ -3532,58 +3784,78 @@ class VirtualMachineScaleSetOSDisk(_model_base.Model): # pylint: disable=too-ma :ivar delete_option: Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only). - :code:`
`:code:`
` Possible values: :code:`
`:code:`
` **Delete** If this value is - used, the OS - disk is deleted when VMSS Flex VM is deleted.:code:`
`:code:`
` **Detach** If this value - is used, the OS disk is retained after VMSS Flex VM is deleted. :code:`
`:code:`
` The + :code:`
`\\ :code:`
` Possible values: :code:`
`\\ :code:`
` **Delete** If this + value is used, the OS + disk is deleted when VMSS Flex VM is deleted.\\ :code:`
`\\ :code:`
` **Detach** If this + value + is used, the OS disk is retained after VMSS Flex VM is deleted. :code:`
`\\ :code:`
` The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. Known values are: "Delete" and "Detach". :vartype delete_option: str or ~azure.mgmt.computefleet.models.DiskDeleteOptionTypes """ - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The disk name.""" - caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field() + caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. Known values are: \"None\", \"ReadOnly\", and \"ReadWrite\".""" - write_accelerator_enabled: Optional[bool] = rest_field(name="writeAcceleratorEnabled") + write_accelerator_enabled: Optional[bool] = rest_field( + name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether writeAccelerator should be enabled or disabled on the disk.""" - create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field(name="createOption") + create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field( + name="createOption", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Required. Known values are: \"FromImage\", \"Empty\", \"Attach\", \"Copy\", and \"Restore\".""" - diff_disk_settings: Optional["_models.DiffDiskSettings"] = rest_field(name="diffDiskSettings") + diff_disk_settings: Optional["_models.DiffDiskSettings"] = rest_field( + name="diffDiskSettings", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.""" - disk_size_gb: Optional[int] = rest_field(name="diskSizeGB") + disk_size_gb: Optional[int] = rest_field( + name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.""" - os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field(name="osType") + os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field( + name="osType", visibility=["read", "create", "update", "delete", "query"] + ) """This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. Known values are: \"Windows\" and \"Linux\".""" - image: Optional["_models.VirtualHardDisk"] = rest_field() + image: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies information about the unmanaged user image to base the scale set on.""" - vhd_containers: Optional[List[str]] = rest_field(name="vhdContainers") + vhd_containers: Optional[List[str]] = rest_field( + name="vhdContainers", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the container urls that are used to store operating system disks for the scale set.""" - managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = rest_field(name="managedDisk") + managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = rest_field( + name="managedDisk", visibility=["read", "create", "update", "delete", "query"] + ) """The managed disk parameters.""" - delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field(name="deleteOption") + delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only). - :code:`
`:code:`
` Possible values: :code:`
`:code:`
` **Delete** If this value is - used, the OS - disk is deleted when VMSS Flex VM is deleted.:code:`
`:code:`
` **Detach** If this value - is used, the OS disk is retained after VMSS Flex VM is deleted. :code:`
`:code:`
` The + :code:`
`\ :code:`
` Possible values: :code:`
`\ :code:`
` **Delete** If this value + is used, the OS + disk is deleted when VMSS Flex VM is deleted.\ :code:`
`\ :code:`
` **Detach** If this + value + is used, the OS disk is retained after VMSS Flex VM is deleted. :code:`
`\ :code:`
` The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. Known values are: \"Delete\" and \"Detach\".""" @@ -3603,16 +3875,16 @@ def __init__( vhd_containers: Optional[List[str]] = None, managed_disk: Optional["_models.VirtualMachineScaleSetManagedDiskParameters"] = None, delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3623,41 +3895,41 @@ class VirtualMachineScaleSetOSProfile(_model_base.Model): in the scale set. Computer name prefixes must be 1 to 15 characters long. :vartype computer_name_prefix: str - :ivar admin_username: Specifies the name of the administrator account. :code:`
`:code:`
` - **Windows-only - restriction:** Cannot end in "." :code:`
`:code:`
` **Disallowed values:** + :ivar admin_username: Specifies the name of the administrator account. :code:`
`\\ + :code:`
` **Windows-only + restriction:** Cannot end in "." :code:`
`\\ :code:`
` **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". - :code:`
`:code:`
` **Minimum-length (Linux):** 1 character :code:`
`:code:`
` - **Max-length - (Linux):** 64 characters :code:`
`:code:`
` **Max-length (Windows):** 20 characters. + :code:`
`\\ :code:`
` **Minimum-length (Linux):** 1 character :code:`
`\\ + :code:`
` **Max-length + (Linux):** 64 characters :code:`
`\\ :code:`
` **Max-length (Windows):** 20 characters. :vartype admin_username: str - :ivar admin_password: Specifies the password of the administrator account. - :code:`
`:code:`
` **Minimum-length - (Windows):** 8 characters :code:`
`:code:`
` **Minimum-length (Linux):** 6 characters - :code:`
`:code:`
` **Max-length (Windows):** 123 characters :code:`
`:code:`
` - **Max-length - (Linux):** 72 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + :ivar admin_password: Specifies the password of the administrator account. :code:`
`\\ + :code:`
` **Minimum-length + (Windows):** 8 characters :code:`
`\\ :code:`
` **Minimum-length (Linux):** 6 characters + :code:`
`\\ :code:`
` **Max-length (Windows):** 123 characters :code:`
`\\ + :code:`
` **Max-length + (Linux):** 72 characters :code:`
`\\ :code:`
` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\\W_]) - :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + :code:`
`\\ :code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", - "Password22", "iloveyou!" :code:`
`:code:`
` For resetting the password, see `How to + "Password22", "iloveyou!" :code:`
`\\ :code:`
` For resetting the password, see `How to reset the Remote Desktop service or its login password in a Windows - VM `_ - :code:`
`:code:`
` For resetting root password, see `Manage users, SSH, and check or + VM `_ + :code:`
`\\ :code:`
` For resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension - `_. + `_. :vartype admin_password: str :ivar custom_data: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see `Using cloud-init to customize a Linux VM during - creation `_. + creation `_. :vartype custom_data: str :ivar windows_configuration: Specifies Windows operating system settings on the virtual machine. @@ -3665,14 +3937,14 @@ class VirtualMachineScaleSetOSProfile(_model_base.Model): :ivar linux_configuration: Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see `Linux on Azure-Endorsed - Distributions `_. + Distributions `_. :vartype linux_configuration: ~azure.mgmt.computefleet.models.LinuxConfiguration :ivar secrets: Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine extension for - Linux `_ + Linux `_ or the `Azure Key Vault virtual machine extension for - Windows `_. + Windows `_. :vartype secrets: list[~azure.mgmt.computefleet.models.VaultSecretGroup] :ivar allow_extension_operations: Specifies whether extension operations should be allowed on the virtual machine @@ -3684,60 +3956,76 @@ class VirtualMachineScaleSetOSProfile(_model_base.Model): :vartype require_guest_provision_signal: bool """ - computer_name_prefix: Optional[str] = rest_field(name="computerNamePrefix") + computer_name_prefix: Optional[str] = rest_field( + name="computerNamePrefix", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long.""" - admin_username: Optional[str] = rest_field(name="adminUsername") - """Specifies the name of the administrator account. :code:`
`:code:`
` **Windows-only - restriction:** Cannot end in \".\" :code:`
`:code:`
` **Disallowed values:** + admin_username: Optional[str] = rest_field( + name="adminUsername", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the name of the administrator account. :code:`
`\ :code:`
` **Windows-only + restriction:** Cannot end in \".\" :code:`
`\ :code:`
` **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\". - :code:`
`:code:`
` **Minimum-length (Linux):** 1 character :code:`
`:code:`
` + :code:`
`\ :code:`
` **Minimum-length (Linux):** 1 character :code:`
`\ :code:`
` **Max-length - (Linux):** 64 characters :code:`
`:code:`
` **Max-length (Windows):** 20 characters.""" + (Linux):** 64 characters :code:`
`\ :code:`
` **Max-length (Windows):** 20 characters.""" admin_password: Optional[str] = rest_field(name="adminPassword", visibility=["create", "update"]) - """Specifies the password of the administrator account. :code:`
`:code:`
` **Minimum-length - (Windows):** 8 characters :code:`
`:code:`
` **Minimum-length (Linux):** 6 characters - :code:`
`:code:`
` **Max-length (Windows):** 123 characters :code:`
`:code:`
` + """Specifies the password of the administrator account. :code:`
`\ :code:`
` + **Minimum-length + (Windows):** 8 characters :code:`
`\ :code:`
` **Minimum-length (Linux):** 6 characters + :code:`
`\ :code:`
` **Max-length (Windows):** 123 characters :code:`
`\ :code:`
` **Max-length - (Linux):** 72 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + (Linux):** 72 characters :code:`
`\ :code:`
` **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) - :code:`
`:code:`
` **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", + :code:`
`\ :code:`
` **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", - \"Password22\", \"iloveyou!\" :code:`
`:code:`
` For resetting the password, see `How to + \"Password22\", \"iloveyou!\" :code:`
`\ :code:`
` For resetting the password, see `How + to reset the Remote Desktop service or its login password in a Windows - VM `_ - :code:`
`:code:`
` For resetting root password, see `Manage users, SSH, and check or + VM `_ + :code:`
`\ :code:`
` For resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension - `_.""" + `_.""" custom_data: Optional[str] = rest_field(name="customData", visibility=["create", "update"]) """Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see `Using cloud-init to customize a Linux VM during - creation `_.""" - windows_configuration: Optional["_models.WindowsConfiguration"] = rest_field(name="windowsConfiguration") + creation `_.""" + windows_configuration: Optional["_models.WindowsConfiguration"] = rest_field( + name="windowsConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies Windows operating system settings on the virtual machine.""" - linux_configuration: Optional["_models.LinuxConfiguration"] = rest_field(name="linuxConfiguration") + linux_configuration: Optional["_models.LinuxConfiguration"] = rest_field( + name="linuxConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see `Linux on Azure-Endorsed - Distributions `_.""" - secrets: Optional[List["_models.VaultSecretGroup"]] = rest_field() + Distributions `_.""" + secrets: Optional[List["_models.VaultSecretGroup"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine extension for - Linux `_ + Linux `_ or the `Azure Key Vault virtual machine extension for - Windows `_.""" - allow_extension_operations: Optional[bool] = rest_field(name="allowExtensionOperations") + Windows `_.""" + allow_extension_operations: Optional[bool] = rest_field( + name="allowExtensionOperations", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False when no extensions are present on the virtual machine scale set.""" - require_guest_provision_signal: Optional[bool] = rest_field(name="requireGuestProvisionSignal") + require_guest_provision_signal: Optional[bool] = rest_field( + name="requireGuestProvisionSignal", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property which must either be set to True or omitted.""" @overload @@ -3753,16 +4041,16 @@ def __init__( secrets: Optional[List["_models.VaultSecretGroup"]] = None, allow_extension_operations: Optional[bool] = None, require_guest_provision_signal: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3782,12 +4070,14 @@ class VirtualMachineScaleSetPublicIPAddressConfiguration(_model_base.Model): # :vartype sku: ~azure.mgmt.computefleet.models.PublicIPAddressSku """ - name: str = rest_field() + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The publicIP address configuration name. Required.""" - properties: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties"] = rest_field() + properties: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration.""" - sku: Optional["_models.PublicIPAddressSku"] = rest_field() + sku: Optional["_models.PublicIPAddressSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.""" @@ -3798,16 +4088,16 @@ def __init__( name: str, properties: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties"] = None, sku: Optional["_models.PublicIPAddressSku"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3830,12 +4120,14 @@ class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(_model_base. ~azure.mgmt.computefleet.models.DomainNameLabelScopeTypes """ - domain_name_label: str = rest_field(name="domainNameLabel") + domain_name_label: str = rest_field( + name="domainNameLabel", visibility=["read", "create", "update", "delete", "query"] + ) """The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created. Required.""" domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = rest_field( - name="domainNameLabelScope" + name="domainNameLabelScope", visibility=["read", "create", "update", "delete", "query"] ) """The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm @@ -3849,16 +4141,16 @@ def __init__( *, domain_name_label: str, domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3885,21 +4177,31 @@ class VirtualMachineScaleSetPublicIPAddressConfigurationProperties(_model_base.M :vartype delete_option: str or ~azure.mgmt.computefleet.models.DeleteOptions """ - idle_timeout_in_minutes: Optional[int] = rest_field(name="idleTimeoutInMinutes") + idle_timeout_in_minutes: Optional[int] = rest_field( + name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) """The idle timeout of the public IP address.""" dns_settings: Optional["_models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings"] = rest_field( - name="dnsSettings" + name="dnsSettings", visibility=["read", "create", "update", "delete", "query"] ) """The dns settings to be applied on the publicIP addresses .""" - ip_tags: Optional[List["_models.VirtualMachineScaleSetIpTag"]] = rest_field(name="ipTags") + ip_tags: Optional[List["_models.VirtualMachineScaleSetIpTag"]] = rest_field( + name="ipTags", visibility=["read", "create", "update", "delete", "query"] + ) """The list of IP tags associated with the public IP address.""" - public_ip_prefix: Optional["_models.SubResource"] = rest_field(name="publicIPPrefix") + public_ip_prefix: Optional["_models.SubResource"] = rest_field( + name="publicIPPrefix", visibility=["read", "create", "update", "delete", "query"] + ) """The PublicIPPrefix from which to allocate publicIP addresses.""" - public_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = rest_field(name="publicIPAddressVersion") + public_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = rest_field( + name="publicIPAddressVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Known values are: \"IPv4\" and \"IPv6\".""" - delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field(name="deleteOption") + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) """Specify what happens to the public IP when the VM is deleted. Known values are: \"Delete\" and \"Detach\".""" @@ -3913,16 +4215,16 @@ def __init__( public_ip_prefix: Optional["_models.SubResource"] = None, public_ip_address_version: Optional[Union[str, "_models.IPVersion"]] = None, delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -3938,12 +4240,12 @@ class VirtualMachineScaleSetStorageProfile(_model_base.Model): :ivar os_disk: Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see `About disks and VHDs for Azure virtual - machines `_. + machines `_. :vartype os_disk: ~azure.mgmt.computefleet.models.VirtualMachineScaleSetOSDisk :ivar data_disks: Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see `About disks and VHDs for Azure virtual - machines `_. + machines `_. :vartype data_disks: list[~azure.mgmt.computefleet.models.VirtualMachineScaleSetDataDisk] :ivar disk_controller_type: Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01. Known values are: "SCSI" and @@ -3951,22 +4253,30 @@ class VirtualMachineScaleSetStorageProfile(_model_base.Model): :vartype disk_controller_type: str or ~azure.mgmt.computefleet.models.DiskControllerTypes """ - image_reference: Optional["_models.ImageReference"] = rest_field(name="imageReference") + image_reference: Optional["_models.ImageReference"] = rest_field( + name="imageReference", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.""" - os_disk: Optional["_models.VirtualMachineScaleSetOSDisk"] = rest_field(name="osDisk") + os_disk: Optional["_models.VirtualMachineScaleSetOSDisk"] = rest_field( + name="osDisk", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see `About disks and VHDs for Azure virtual - machines `_.""" - data_disks: Optional[List["_models.VirtualMachineScaleSetDataDisk"]] = rest_field(name="dataDisks") + machines `_.""" + data_disks: Optional[List["_models.VirtualMachineScaleSetDataDisk"]] = rest_field( + name="dataDisks", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see `About disks and VHDs for Azure virtual - machines `_.""" - disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = rest_field(name="diskControllerType") + machines `_.""" + disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = rest_field( + name="diskControllerType", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01. Known values are: \"SCSI\" and \"NVMe\".""" @@ -3978,16 +4288,16 @@ def __init__( os_disk: Optional["_models.VirtualMachineScaleSetOSDisk"] = None, data_disks: Optional[List["_models.VirtualMachineScaleSetDataDisk"]] = None, disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4000,9 +4310,9 @@ class VMAttributeMinMaxDouble(_model_base.Model): :vartype max: float """ - min: Optional[float] = rest_field() + min: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Minimum value. default 0. Double.MinValue().""" - max: Optional[float] = rest_field() + max: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Maximum value. Double.MaxValue(1.7976931348623157E+308).""" @overload @@ -4011,16 +4321,16 @@ def __init__( *, min: Optional[float] = None, # pylint: disable=redefined-builtin max: Optional[float] = None, # pylint: disable=redefined-builtin - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4034,9 +4344,9 @@ class VMAttributeMinMaxInteger(_model_base.Model): :vartype max: int """ - min: Optional[int] = rest_field() + min: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.""" - max: Optional[int] = rest_field() + max: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.""" @overload @@ -4045,20 +4355,20 @@ def __init__( *, min: Optional[int] = None, # pylint: disable=redefined-builtin max: Optional[int] = None, # pylint: disable=redefined-builtin - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class VMAttributes(_model_base.Model): # pylint: disable=too-many-instance-attributes +class VMAttributes(_model_base.Model): """VMAttributes that will be used to filter VMSizes which will be used to build Fleet. @@ -4072,7 +4382,9 @@ class VMAttributes(_model_base.Model): # pylint: disable=too-many-instance-attr Optional parameter. Either Min or Max is required if specified. :vartype memory_in_gi_b_per_v_cpu: ~azure.mgmt.computefleet.models.VMAttributeMinMaxDouble :ivar local_storage_support: Specifies whether the VMSize supporting local storage should be - used to build Fleet or not. Known values are: "Excluded", "Included", and "Required". + used to build Fleet or not. + Included - Default if not specified as most Azure VMs support local storage. Known values are: + "Excluded", "Included", and "Required". :vartype local_storage_support: str or ~azure.mgmt.computefleet.models.VMAttributeSupport :ivar local_storage_in_gi_b: LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. @@ -4135,76 +4447,111 @@ class VMAttributes(_model_base.Model): # pylint: disable=too-many-instance-attr :vartype excluded_vm_sizes: list[str] """ - v_cpu_count: "_models.VMAttributeMinMaxInteger" = rest_field(name="vCpuCount") + v_cpu_count: "_models.VMAttributeMinMaxInteger" = rest_field( + name="vCpuCount", visibility=["read", "create", "update", "delete", "query"] + ) """The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. Required.""" - memory_in_gi_b: "_models.VMAttributeMinMaxDouble" = rest_field(name="memoryInGiB") + memory_in_gi_b: "_models.VMAttributeMinMaxDouble" = rest_field( + name="memoryInGiB", visibility=["read", "create", "update", "delete", "query"] + ) """The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. Required.""" - memory_in_gi_b_per_v_cpu: Optional["_models.VMAttributeMinMaxDouble"] = rest_field(name="memoryInGiBPerVCpu") + memory_in_gi_b_per_v_cpu: Optional["_models.VMAttributeMinMaxDouble"] = rest_field( + name="memoryInGiBPerVCpu", visibility=["read", "create", "update", "delete", "query"] + ) """The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified.""" - local_storage_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field(name="localStorageSupport") + local_storage_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="localStorageSupport", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the VMSize supporting local storage should be used to build Fleet or not. - Known values are: \"Excluded\", \"Included\", and \"Required\".""" - local_storage_in_gi_b: Optional["_models.VMAttributeMinMaxDouble"] = rest_field(name="localStorageInGiB") + Included - Default if not specified as most Azure VMs support local storage. Known values are: + \"Excluded\", \"Included\", and \"Required\".""" + local_storage_in_gi_b: Optional["_models.VMAttributeMinMaxDouble"] = rest_field( + name="localStorageInGiB", visibility=["read", "create", "update", "delete", "query"] + ) """LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If localStorageSupport is \"Excluded\", this VMAttribute can not be used.""" local_storage_disk_types: Optional[List[Union[str, "_models.LocalStorageDiskType"]]] = rest_field( - name="localStorageDiskTypes" + name="localStorageDiskTypes", visibility=["read", "create", "update", "delete", "query"] ) """The local storage disk types specified as a list. LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If localStorageSupport is \"Excluded\", this VMAttribute can not be used.""" - data_disk_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field(name="dataDiskCount") + data_disk_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( + name="dataDiskCount", visibility=["read", "create", "update", "delete", "query"] + ) """The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.""" - network_interface_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field(name="networkInterfaceCount") + network_interface_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( + name="networkInterfaceCount", visibility=["read", "create", "update", "delete", "query"] + ) """The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.""" - network_bandwidth_in_mbps: Optional["_models.VMAttributeMinMaxDouble"] = rest_field(name="networkBandwidthInMbps") + network_bandwidth_in_mbps: Optional["_models.VMAttributeMinMaxDouble"] = rest_field( + name="networkBandwidthInMbps", visibility=["read", "create", "update", "delete", "query"] + ) """The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified.""" - rdma_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field(name="rdmaSupport") + rdma_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="rdmaSupport", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not. Known values are: \"Excluded\", \"Included\", and \"Required\".""" rdma_network_interface_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( - name="rdmaNetworkInterfaceCount" + name="rdmaNetworkInterfaceCount", visibility=["read", "create", "update", "delete", "query"] ) """The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. rdmaSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If rdmaSupport is \"Excluded\", this VMAttribute can not be used.""" - accelerator_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field(name="acceleratorSupport") + accelerator_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="acceleratorSupport", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the VMSize supporting accelerator should be used to build Fleet or not. acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute can not be used. Known values are: \"Excluded\", \"Included\", and \"Required\".""" accelerator_manufacturers: Optional[List[Union[str, "_models.AcceleratorManufacturer"]]] = rest_field( - name="acceleratorManufacturers" + name="acceleratorManufacturers", visibility=["read", "create", "update", "delete", "query"] ) """The accelerator manufacturers specified as a list. acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute can not be used.""" - accelerator_types: Optional[List[Union[str, "_models.AcceleratorType"]]] = rest_field(name="acceleratorTypes") + accelerator_types: Optional[List[Union[str, "_models.AcceleratorType"]]] = rest_field( + name="acceleratorTypes", visibility=["read", "create", "update", "delete", "query"] + ) """The accelerator types specified as a list. acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute can not be used.""" - accelerator_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field(name="acceleratorCount") + accelerator_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( + name="acceleratorCount", visibility=["read", "create", "update", "delete", "query"] + ) """The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified. acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute can not be used.""" - vm_categories: Optional[List[Union[str, "_models.VMCategory"]]] = rest_field(name="vmCategories") + vm_categories: Optional[List[Union[str, "_models.VMCategory"]]] = rest_field( + name="vmCategories", visibility=["read", "create", "update", "delete", "query"] + ) """The VM category specified as a list. Optional parameter.""" - architecture_types: Optional[List[Union[str, "_models.ArchitectureType"]]] = rest_field(name="architectureTypes") + architecture_types: Optional[List[Union[str, "_models.ArchitectureType"]]] = rest_field( + name="architectureTypes", visibility=["read", "create", "update", "delete", "query"] + ) """The VM architecture types specified as a list. Optional parameter.""" - cpu_manufacturers: Optional[List[Union[str, "_models.CpuManufacturer"]]] = rest_field(name="cpuManufacturers") + cpu_manufacturers: Optional[List[Union[str, "_models.CpuManufacturer"]]] = rest_field( + name="cpuManufacturers", visibility=["read", "create", "update", "delete", "query"] + ) """The VM CPU manufacturers specified as a list. Optional parameter.""" - burstable_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field(name="burstableSupport") + burstable_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="burstableSupport", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not. Known values are: \"Excluded\", \"Included\", and \"Required\".""" - excluded_vm_sizes: Optional[List[str]] = rest_field(name="excludedVMSizes") + excluded_vm_sizes: Optional[List[str]] = rest_field( + name="excludedVMSizes", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies which VMSizes should be excluded while building Fleet. Optional parameter.""" @overload @@ -4231,16 +4578,16 @@ def __init__( cpu_manufacturers: Optional[List[Union[str, "_models.CpuManufacturer"]]] = None, burstable_support: Optional[Union[str, "_models.VMAttributeSupport"]] = None, excluded_vm_sizes: Optional[List[str]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4264,7 +4611,7 @@ class VMDiskSecurityProfile(_model_base.Model): """ security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = rest_field( - name="securityEncryptionType" + name="securityEncryptionType", visibility=["read", "create", "update", "delete", "query"] ) """Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState @@ -4272,7 +4619,9 @@ class VMDiskSecurityProfile(_model_base.Model): NonPersistedTPM for not persisting firmware state in the VMGuestState blob.. **Note:** It can be set for only Confidential VMs. Known values are: \"VMGuestStateOnly\", \"DiskWithVMGuestState\", and \"NonPersistedTPM\".""" - disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field(name="diskEncryptionSet") + disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field( + name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.""" @@ -4283,16 +4632,16 @@ def __init__( *, security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = None, disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4306,7 +4655,7 @@ class VMGalleryApplication(_model_base.Model): :ivar order: Optional, Specifies the order in which the packages have to be installed. :vartype order: int :ivar package_reference_id: Specifies the GalleryApplicationVersion resource id on the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. # pylint: disable=line-too-long + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. Required. :vartype package_reference_id: str :ivar configuration_reference: Optional, Specifies the uri to an azure blob that will replace @@ -4323,21 +4672,29 @@ class VMGalleryApplication(_model_base.Model): :vartype enable_automatic_upgrade: bool """ - tags: Optional[str] = rest_field() + tags: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Optional, Specifies a passthrough value for more generic context.""" - order: Optional[int] = rest_field() + order: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Optional, Specifies the order in which the packages have to be installed.""" - package_reference_id: str = rest_field(name="packageReferenceId") + package_reference_id: str = rest_field( + name="packageReferenceId", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the GalleryApplicationVersion resource id on the form of - /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. # pylint: disable=line-too-long + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. Required.""" - configuration_reference: Optional[str] = rest_field(name="configurationReference") + configuration_reference: Optional[str] = rest_field( + name="configurationReference", visibility=["read", "create", "update", "delete", "query"] + ) """Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided.""" - treat_failure_as_deployment_failure: Optional[bool] = rest_field(name="treatFailureAsDeploymentFailure") + treat_failure_as_deployment_failure: Optional[bool] = rest_field( + name="treatFailureAsDeploymentFailure", visibility=["read", "create", "update", "delete", "query"] + ) """Optional, If true, any failure for any operation in the VmApplication will fail the deployment.""" - enable_automatic_upgrade: Optional[bool] = rest_field(name="enableAutomaticUpgrade") + enable_automatic_upgrade: Optional[bool] = rest_field( + name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"] + ) """If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the VM/VMSS.""" @@ -4351,16 +4708,16 @@ def __init__( configuration_reference: Optional[str] = None, treat_failure_as_deployment_failure: Optional[bool] = None, enable_automatic_upgrade: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4377,9 +4734,9 @@ class VmSizeProfile(_model_base.Model): :vartype rank: int """ - name: str = rest_field() + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The Sku name (e.g. 'Standard_DS1_v2'). Required.""" - rank: Optional[int] = rest_field() + rank: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The rank of the VM size. This is used with 'RegularPriorityAllocationStrategy.Prioritized' The lower the number, the higher the priority. Starting with 0.""" @@ -4389,16 +4746,16 @@ def __init__( *, name: str, rank: Optional[int] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4410,30 +4767,34 @@ class VMSizeProperties(_model_base.Model): specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of `List all available virtual machine sizes in a - region `_. + region `_. :vartype v_cpus_available: int :ivar v_cpus_per_core: Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of `List all available virtual machine sizes in a - region `_. + region `_. **Setting this property to 1 also means that hyper-threading is disabled.**. :vartype v_cpus_per_core: int """ - v_cpus_available: Optional[int] = rest_field(name="vCPUsAvailable") + v_cpus_available: Optional[int] = rest_field( + name="vCPUsAvailable", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of `List all available virtual machine sizes in a - region `_.""" - v_cpus_per_core: Optional[int] = rest_field(name="vCPUsPerCore") + region `_.""" + v_cpus_per_core: Optional[int] = rest_field( + name="vCPUsPerCore", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of `List all available virtual machine sizes in a - region `_. + region `_. **Setting this property to 1 also means that hyper-threading is disabled.**.""" @overload @@ -4442,16 +4803,16 @@ def __init__( *, v_cpus_available: Optional[int] = None, v_cpus_per_core: Optional[int] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4472,10 +4833,10 @@ class WindowsConfiguration(_model_base.Model): :ivar time_zone: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be `TimeZoneInfo.Id - `_ + `_ value from time zones returned by `TimeZoneInfo.GetSystemTimeZones - `_. + `_. :vartype time_zone: str :ivar additional_unattend_content: Specifies additional base-64 encoded XML formatted information that can be @@ -4494,34 +4855,44 @@ class WindowsConfiguration(_model_base.Model): :vartype enable_vm_agent_platform_updates: bool """ - provision_vm_agent: Optional[bool] = rest_field(name="provisionVMAgent") + provision_vm_agent: Optional[bool] = rest_field( + name="provisionVMAgent", visibility=["read", "create", "update", "delete", "query"] + ) """Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.""" - enable_automatic_updates: Optional[bool] = rest_field(name="enableAutomaticUpdates") + enable_automatic_updates: Optional[bool] = rest_field( + name="enableAutomaticUpdates", visibility=["read", "create", "update", "delete", "query"] + ) """Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.""" - time_zone: Optional[str] = rest_field(name="timeZone") + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) """Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". Possible values can be `TimeZoneInfo.Id - `_ + `_ value from time zones returned by `TimeZoneInfo.GetSystemTimeZones - `_.""" + `_.""" additional_unattend_content: Optional[List["_models.AdditionalUnattendContent"]] = rest_field( - name="additionalUnattendContent" + name="additionalUnattendContent", visibility=["read", "create", "update", "delete", "query"] ) """Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.""" - patch_settings: Optional["_models.PatchSettings"] = rest_field(name="patchSettings") + patch_settings: Optional["_models.PatchSettings"] = rest_field( + name="patchSettings", visibility=["read", "create", "update", "delete", "query"] + ) """[Preview Feature] Specifies settings related to VM Guest Patching on Windows.""" - win_rm: Optional["_models.WinRMConfiguration"] = rest_field(name="winRM") + win_rm: Optional["_models.WinRMConfiguration"] = rest_field( + name="winRM", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.""" - enable_vm_agent_platform_updates: Optional[bool] = rest_field(name="enableVMAgentPlatformUpdates") + enable_vm_agent_platform_updates: Optional[bool] = rest_field( + name="enableVMAgentPlatformUpdates", visibility=["read", "create", "update", "delete", "query"] + ) """Indicates whether VMAgent Platform Updates is enabled for the Windows virtual machine. Default value is false.""" @@ -4536,16 +4907,16 @@ def __init__( patch_settings: Optional["_models.PatchSettings"] = None, win_rm: Optional["_models.WinRMConfiguration"] = None, enable_vm_agent_platform_updates: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4564,12 +4935,12 @@ class WindowsVMGuestPatchAutomaticByPlatformSettings(_model_base.Model): # pyli """ reboot_setting: Optional[Union[str, "_models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = rest_field( - name="rebootSetting" + name="rebootSetting", visibility=["read", "create", "update", "delete", "query"] ) """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\".""" bypass_platform_safety_checks_on_user_schedule: Optional[bool] = rest_field( - name="bypassPlatformSafetyChecksOnUserSchedule" + name="bypassPlatformSafetyChecksOnUserSchedule", visibility=["read", "create", "update", "delete", "query"] ) """Enables customer to schedule patching without accidental upgrades.""" @@ -4579,16 +4950,16 @@ def __init__( *, reboot_setting: Optional[Union[str, "_models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = None, bypass_platform_safety_checks_on_user_schedule: Optional[bool] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4599,7 +4970,9 @@ class WinRMConfiguration(_model_base.Model): :vartype listeners: list[~azure.mgmt.computefleet.models.WinRMListener] """ - listeners: Optional[List["_models.WinRMListener"]] = rest_field() + listeners: Optional[List["_models.WinRMListener"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The list of Windows Remote Management listeners.""" @overload @@ -4607,16 +4980,16 @@ def __init__( self, *, listeners: Optional[List["_models.WinRMListener"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -4630,39 +5003,44 @@ class WinRMListener(_model_base.Model): a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key - vault `_. + vault `_. In this case, your certificate needs to be the Base64 encoding of the following - JSON Object which is encoded in UTF-8: :code:`
`:code:`
` {:code:`
` - "data":":code:``",:code:`
` "dataType":"pfx",:code:`
` - "password":":code:``":code:`
`} :code:`
` To install certificates on - a virtual + JSON Object which is encoded in UTF-8: :code:`
`\\ :code:`
` {\\ :code:`
` + "data":"\\ :code:``",\\ :code:`
` "dataType":"pfx",\\ + :code:`
` + "password":"\\ :code:``"\\ :code:`
`} :code:`
` To install + certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine extension for - Linux `_ + Linux `_ or the `Azure Key Vault virtual machine extension for - Windows `_. + Windows `_. :vartype certificate_url: str """ - protocol: Optional[Union[str, "_models.ProtocolTypes"]] = rest_field() + protocol: Optional[Union[str, "_models.ProtocolTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. Known values are: \"Http\" and \"Https\".""" - certificate_url: Optional[str] = rest_field(name="certificateUrl") + certificate_url: Optional[str] = rest_field( + name="certificateUrl", visibility=["read", "create", "update", "delete", "query"] + ) """This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key - vault `_. + vault `_. In this case, your certificate needs to be the Base64 encoding of the following - JSON Object which is encoded in UTF-8: :code:`
`:code:`
` {:code:`
` - \"data\":\":code:``\",:code:`
` - \"dataType\":\"pfx\",:code:`
` - \"password\":\":code:``\":code:`
`} :code:`
` To install certificates - on a virtual + JSON Object which is encoded in UTF-8: :code:`
`\ :code:`
` {\ :code:`
` + \"data\":\"\ :code:``\",\ :code:`
` \"dataType\":\"pfx\",\ + :code:`
` + \"password\":\"\ :code:``\"\ :code:`
`} :code:`
` To install + certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine extension for - Linux `_ + Linux `_ or the `Azure Key Vault virtual machine extension for - Windows `_.""" + Windows `_.""" @overload def __init__( @@ -4670,14 +5048,14 @@ def __init__( *, protocol: Optional[Union[str, "_models.ProtocolTypes"]] = None, certificate_url: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/__init__.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/__init__.py index 180cf6d7d21..5134d89815c 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/__init__.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/__init__.py @@ -5,17 +5,23 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import Operations -from ._operations import FleetsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import FleetsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "Operations", "FleetsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_operations.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_operations.py index c953d1c9303..e3e5e798caa 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_operations.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +12,7 @@ from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -32,8 +33,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._model_base import SdkJSONEncoder, _deserialize -from .._serialization import Serializer +from .._configuration import ComputeFleetMgmtClientConfiguration +from .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._serialization import Deserializer, Serializer if sys.version_info >= (3, 9): from collections.abc import MutableMapping @@ -76,7 +78,7 @@ def build_fleets_get_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -105,7 +107,7 @@ def build_fleets_create_or_update_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -136,7 +138,7 @@ def build_fleets_update_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -166,7 +168,7 @@ def build_fleets_delete_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -247,7 +249,7 @@ def build_fleets_list_virtual_machine_scale_sets_request( # pylint: disable=nam accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -277,10 +279,10 @@ class Operations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeFleetMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: @@ -358,7 +360,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -378,10 +380,10 @@ class FleetsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeFleetMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> _models.Fleet: @@ -436,7 +438,7 @@ def get(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> _mode except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -501,7 +503,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -726,7 +728,7 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -940,7 +942,7 @@ def _delete_initial(self, resource_group_name: str, fleet_name: str, **kwargs: A except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1093,7 +1095,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1177,7 +1179,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1270,7 +1272,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update.py index 3c182d5204c..13ecb104f32 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update_minimum_set.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update_minimum_set.py index 4caaa75d683..156eb13fbf0 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update_minimum_set.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update_minimum_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_update.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_update.py index 34b882bfb2d..1a343690070 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_update.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_async_test.py b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_async_test.py index e7555263c79..357b0e45a4c 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_async_test.py +++ b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_async_test.py @@ -13,6 +13,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestComputeFleetMgmtFleetsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_test.py b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_test.py index 4740170973b..a2c3ca01b32 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_test.py +++ b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_fleets_operations_test.py @@ -12,6 +12,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestComputeFleetMgmtFleetsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_async_test.py b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_async_test.py index b87a333b58e..d7027c0bd41 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_async_test.py +++ b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_async_test.py @@ -13,6 +13,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestComputeFleetMgmtOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_test.py b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_test.py index 921096d91c6..3e9d59e6a28 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_test.py +++ b/sdk/computefleet/azure-mgmt-computefleet/tests/test_compute_fleet_mgmt_operations_test.py @@ -12,6 +12,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestComputeFleetMgmtOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/computefleet/azure-mgmt-computefleet/tsp-location.yaml b/sdk/computefleet/azure-mgmt-computefleet/tsp-location.yaml index 58d3b941914..c1f6689e7ad 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/tsp-location.yaml +++ b/sdk/computefleet/azure-mgmt-computefleet/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: fda3d5e4ae4c69aa72ddfdf5ca1b6d5795a03e71 +commit: 676334a284e5136f0a0721d6ae844bb04332f579 repo: Azure/azure-rest-api-specs additionalDirectories: