diff --git a/sdk/computefleet/azure-mgmt-computefleet/CHANGELOG.md b/sdk/computefleet/azure-mgmt-computefleet/CHANGELOG.md index b7fb325e2790..df5ab4779d29 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/CHANGELOG.md +++ b/sdk/computefleet/azure-mgmt-computefleet/CHANGELOG.md @@ -1,5 +1,27 @@ # Release History +## 2.0.0b1 (2025-08-14) + +### Features Added + + - Model `FleetProperties` added property `mode` + - Model `FleetProperties` added property `capacity_type` + - Model `FleetProperties` added property `zone_allocation_policy` + - Enum `ManagedServiceIdentityType` added member `SYSTEM_ASSIGNED_USER_ASSIGNED` + - Added enum `CapacityType` + - Added enum `FleetMode` + - Added enum `VMOperationStatus` + - Added model `VirtualMachine` + - Added model `ZoneAllocationPolicy` + - Added enum `ZoneDistributionStrategy` + - Added model `ZonePreference` + - Model `FleetsOperations` added method `begin_cancel` + - Model `FleetsOperations` added method `list_virtual_machines` + +### Breaking Changes + + - Deleted or renamed enum value `ManagedServiceIdentityType.SYSTEM_AND_USER_ASSIGNED` + ## 1.0.0 (2024-10-22) ### Features Added diff --git a/sdk/computefleet/azure-mgmt-computefleet/MANIFEST.in b/sdk/computefleet/azure-mgmt-computefleet/MANIFEST.in index 604d3c94efff..4d2967d8c2e6 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/MANIFEST.in +++ b/sdk/computefleet/azure-mgmt-computefleet/MANIFEST.in @@ -1,4 +1,3 @@ -include _meta.json recursive-include tests *.py *.json recursive-include samples *.py *.md include *.md diff --git a/sdk/computefleet/azure-mgmt-computefleet/README.md b/sdk/computefleet/azure-mgmt-computefleet/README.md index 07ee3a7433e7..b78ddf3007ba 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/README.md +++ b/sdk/computefleet/azure-mgmt-computefleet/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Computefleet Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/computefleet/azure-mgmt-computefleet/_meta.json b/sdk/computefleet/azure-mgmt-computefleet/_metadata.json similarity index 53% rename from sdk/computefleet/azure-mgmt-computefleet/_meta.json rename to sdk/computefleet/azure-mgmt-computefleet/_metadata.json index e8f721942b71..2426e83371e3 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/_meta.json +++ b/sdk/computefleet/azure-mgmt-computefleet/_metadata.json @@ -1,6 +1,7 @@ { - "commit": "fda3d5e4ae4c69aa72ddfdf5ca1b6d5795a03e71", + "apiVersion": "2025-07-01-preview", + "commit": "063aae9a2ad0060accf70c1a605c2931cad19049", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/azurefleet/AzureFleet.Management", - "@azure-tools/typespec-python": "0.35.1" + "emitterVersion": "0.48.1" } \ 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 000000000000..274b6c740c00 --- /dev/null +++ b/sdk/computefleet/azure-mgmt-computefleet/apiview-properties.json @@ -0,0 +1,161 @@ +{ + "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.VirtualMachine": "Microsoft.AzureFleet.VirtualMachine", + "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.ZoneAllocationPolicy": "Microsoft.AzureFleet.ZoneAllocationPolicy", + "azure.mgmt.computefleet.models.ZonePreference": "Microsoft.AzureFleet.ZonePreference", + "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.FleetMode": "Microsoft.AzureFleet.FleetMode", + "azure.mgmt.computefleet.models.CapacityType": "Microsoft.AzureFleet.CapacityType", + "azure.mgmt.computefleet.models.ZoneDistributionStrategy": "Microsoft.AzureFleet.ZoneDistributionStrategy", + "azure.mgmt.computefleet.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "azure.mgmt.computefleet.models.VMOperationStatus": "Microsoft.AzureFleet.VMOperationStatus", + "azure.mgmt.computefleet.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.computefleet.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.computefleet.operations.FleetsOperations.get": "Microsoft.AzureFleet.Fleets.get", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.get": "Microsoft.AzureFleet.Fleets.get", + "azure.mgmt.computefleet.operations.FleetsOperations.begin_create_or_update": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.begin_create_or_update": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "azure.mgmt.computefleet.operations.FleetsOperations.begin_update": "Microsoft.AzureFleet.Fleets.update", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.begin_update": "Microsoft.AzureFleet.Fleets.update", + "azure.mgmt.computefleet.operations.FleetsOperations.begin_delete": "Microsoft.AzureFleet.Fleets.delete", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.begin_delete": "Microsoft.AzureFleet.Fleets.delete", + "azure.mgmt.computefleet.operations.FleetsOperations.list_by_resource_group": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.list_by_resource_group": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "azure.mgmt.computefleet.operations.FleetsOperations.list_by_subscription": "Microsoft.AzureFleet.Fleets.listBySubscription", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.list_by_subscription": "Microsoft.AzureFleet.Fleets.listBySubscription", + "azure.mgmt.computefleet.operations.FleetsOperations.list_virtual_machine_scale_sets": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.list_virtual_machine_scale_sets": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets", + "azure.mgmt.computefleet.operations.FleetsOperations.list_virtual_machines": "Microsoft.AzureFleet.Fleets.listVirtualMachines", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.list_virtual_machines": "Microsoft.AzureFleet.Fleets.listVirtualMachines", + "azure.mgmt.computefleet.operations.FleetsOperations.begin_cancel": "Microsoft.AzureFleet.Fleets.cancel", + "azure.mgmt.computefleet.aio.operations.FleetsOperations.begin_cancel": "Microsoft.AzureFleet.Fleets.cancel" + } +} \ 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 9ff3c12c42a2..ea77f918f670 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/_client.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_client.py index 6aff7c6f0d21..57c5c15e4a7b 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_client.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_client.py @@ -7,16 +7,18 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from ._configuration import ComputeFleetMgmtClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import FleetsOperations, Operations if TYPE_CHECKING: @@ -34,26 +36,33 @@ class ComputeFleetMgmtClient: :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is "2024-11-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2025-07-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ComputeFleetMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -72,7 +81,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_configuration.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_configuration.py index a207b596a4f6..037bc4e2efc1 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_configuration.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_configuration.py @@ -29,8 +29,9 @@ class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance- :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is "2024-11-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2025-07-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -41,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-11-01") + api_version: str = kwargs.pop("api_version", "2025-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/__init__.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_model_base.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/model_base.py similarity index 92% rename from sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_model_base.py rename to sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/model_base.py index 9d401b0cf012..c62e7e7784af 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_model_base.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/model_base.py @@ -2,10 +2,11 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines +# pylint: disable=protected-access, broad-except import copy import calendar @@ -21,17 +22,14 @@ from datetime import datetime, date, time, timedelta, timezone from json import JSONEncoder import xml.etree.ElementTree as ET +from collections.abc import MutableMapping from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError from azure.core import CaseInsensitiveEnumMeta from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping +from azure.core.rest import HttpResponse _LOGGER = logging.getLogger(__name__) @@ -347,7 +345,7 @@ def _get_model(module_name: str, model_name: str): _UNSET = object() -class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object +class _MyMutableMapping(MutableMapping[str, typing.Any]): def __init__(self, data: typing.Dict[str, typing.Any]) -> None: self._data = data @@ -373,50 +371,97 @@ 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: return default @typing.overload - def pop(self, key: str) -> typing.Any: ... + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ @typing.overload - def pop(self, key: str, default: _T) -> _T: ... + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs 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: + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + 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 def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs 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 +619,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 +630,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__ @@ -597,12 +642,12 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - return super().__new__(cls) # pylint: disable=no-value-for-parameter + return super().__new__(cls) 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 +658,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: @@ -754,7 +799,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 +939,35 @@ def _deserialize( return _deserialize_with_callable(deserializer, value) +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), 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, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + 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/_utils/serialization.py similarity index 93% rename from sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_serialization.py rename to sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/serialization.py index 7b3074215a30..eb86ea23c965 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_serialization.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_utils/serialization.py @@ -1,27 +1,10 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -47,9 +30,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -60,13 +41,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 +165,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 @@ -478,8 +393,8 @@ def from_dict( :param function key_extractors: A key extractor function. :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()) deserializer.key_extractors = ( # type: ignore @@ -506,7 +421,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 +432,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 +477,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 +512,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 +540,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 +650,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 +695,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 +719,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 +749,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 +769,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 +1106,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 +1132,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 +1165,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 +1343,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 +1355,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 +1366,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 +1402,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 +1416,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 +1597,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 +1631,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 +1713,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 +1759,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 +1850,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 +1863,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 +1878,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 +1896,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 +1909,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 +1927,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 +1943,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 +1958,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 +1981,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 +2019,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/_validation.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_validation.py new file mode 100644 index 000000000000..f5af3a4eb8a2 --- /dev/null +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_validation.py @@ -0,0 +1,66 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools + + +def api_version_validation(**kwargs): + params_added_on = kwargs.pop("params_added_on", {}) + method_added_on = kwargs.pop("method_added_on", "") + api_versions_list = kwargs.pop("api_versions_list", []) + + def _index_with_default(value: str, default: int = -1) -> int: + """Get the index of value in lst, or return default if not found. + + :param value: The value to search for in the api_versions_list. + :type value: str + :param default: The default value to return if the value is not found. + :type default: int + :return: The index of the value in the list, or the default value if not found. + :rtype: int + """ + try: + return api_versions_list.index(value) + except ValueError: + return default + + def decorator(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + try: + # this assumes the client has an _api_version attribute + client = args[0] + client_api_version = client._config.api_version # pylint: disable=protected-access + except AttributeError: + return func(*args, **kwargs) + + if _index_with_default(method_added_on) > _index_with_default(client_api_version): + raise ValueError( + f"'{func.__name__}' is not available in API version " + f"{client_api_version}. Pass service API version {method_added_on} or newer to your client." + ) + + unsupported = { + parameter: api_version + for api_version, parameters in params_added_on.items() + for parameter in parameters + if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version) + } + if unsupported: + raise ValueError( + "".join( + [ + f"'{param}' is not available in API version {client_api_version}. " + f"Use service API version {version} or newer.\n" + for param, version in unsupported.items() + ] + ) + ) + return func(*args, **kwargs) + + return wrapper + + return decorator 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 0ec13ea52bbf..0e00a6283246 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 = "2.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 9d35ee9b42be..2deb1f068553 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/_client.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_client.py index 4184cc33345c..bf1350d5a487 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_client.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_client.py @@ -7,15 +7,17 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import ComputeFleetMgmtClientConfiguration from .operations import FleetsOperations, Operations @@ -34,26 +36,33 @@ class ComputeFleetMgmtClient: :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is "2024-11-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2025-07-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ComputeFleetMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -72,7 +81,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, _endpoint), policies=_policies, **kwargs + ) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_configuration.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_configuration.py index 4f2f68b6609c..fe800fbaac97 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_configuration.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_configuration.py @@ -29,8 +29,9 @@ class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance- :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is "2024-11-01". - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Default value is + "2025-07-01-preview". Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -41,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-11-01") + api_version: str = kwargs.pop("api_version", "2025-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize 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 180cf6d7d211..5134d89815cb 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 d32a7ad8db38..78568f08b446 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 @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +from typing import Any, 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,25 +34,26 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer +from ..._validation import api_version_validation from ...operations._operations import ( + build_fleets_cancel_request, build_fleets_create_or_update_request, build_fleets_delete_request, build_fleets_get_request, build_fleets_list_by_resource_group_request, build_fleets_list_by_subscription_request, build_fleets_list_virtual_machine_scale_sets_request, + build_fleets_list_virtual_machines_request, build_fleets_update_request, build_operations_list_request, ) +from .._configuration import ComputeFleetMgmtClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] class Operations: @@ -66,13 +68,13 @@ 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"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: """List the operations for the provider. :return: An iterator like instance of Operation @@ -131,7 +133,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -147,7 +149,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -167,10 +169,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 +227,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -290,7 +292,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -515,7 +517,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -729,7 +731,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -802,7 +804,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.Fleet"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Fleet"]: """List Fleet resources by resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -866,7 +868,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Fleet], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Fleet], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -882,7 +884,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -890,7 +892,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Fleet"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.Fleet"]: """List Fleet resources by subscription ID. :return: An iterator like instance of Fleet @@ -950,7 +952,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Fleet], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Fleet], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -966,7 +968,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -976,7 +978,7 @@ async def get_next(next_link=None): @distributed_trace def list_virtual_machine_scale_sets( self, resource_group_name: str, name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualMachineScaleSet"]: + ) -> AsyncItemPaged["_models.VirtualMachineScaleSet"]: """List VirtualMachineScaleSet resources by Fleet. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1044,7 +1046,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.VirtualMachineScaleSet], deserialized["value"]) + list_of_elem = _deserialize(List[_models.VirtualMachineScaleSet], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1060,9 +1062,251 @@ 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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-01-preview", + params_added_on={ + "2025-07-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "name", + "filter", + "skiptoken", + "accept", + ] + }, + api_versions_list=["2025-07-01-preview"], + ) + def list_virtual_machines( + self, + resource_group_name: str, + name: str, + *, + filter: Optional[str] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.VirtualMachine"]: + """List VirtualMachine resources of an instance Fleet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param name: The name of the Fleet. Required. + :type name: str + :keyword filter: Filter expression to filter the virtual machines. Default value is None. + :paramtype filter: str + :keyword skiptoken: Skip token for pagination. Uses the token from a previous response to fetch + the next page of results. Default value is None. + :paramtype skiptoken: str + :return: An iterator like instance of VirtualMachine + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.computefleet.models.VirtualMachine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.VirtualMachine]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_fleets_list_virtual_machines_request( + resource_group_name=resource_group_name, + name=name, + subscription_id=self._config.subscription_id, + filter=filter, + skiptoken=skiptoken, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.VirtualMachine], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-01-preview", + params_added_on={"2025-07-01-preview": ["api_version", "subscription_id", "resource_group_name", "fleet_name"]}, + api_versions_list=["2025-07-01-preview"], + ) + async def _cancel_initial(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_fleets_cancel_request( + resource_group_name=resource_group_name, + fleet_name=fleet_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-01-preview", + params_added_on={"2025-07-01-preview": ["api_version", "subscription_id", "resource_group_name", "fleet_name"]}, + api_versions_list=["2025-07-01-preview"], + ) + async def begin_cancel(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Cancels an instance Fleet creation that is in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param fleet_name: The name of the Compute Fleet. Required. + :type fleet_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + fleet_name=fleet_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize 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 4f5387c39f12..8e2c354ea5e5 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,157 @@ # 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, + VirtualMachine, + 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, + ZoneAllocationPolicy, + ZonePreference, +) + +from ._enums import ( # type: ignore + AcceleratorManufacturer, + AcceleratorType, + ActionType, + ArchitectureType, + CachingTypes, + CapacityType, + CpuManufacturer, + CreatedByType, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DomainNameLabelScopeTypes, + EvictionPolicy, + FleetMode, + IPVersion, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + LocalStorageDiskType, + ManagedServiceIdentityType, + Mode, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + OperatingSystemTypes, + Origin, + ProtocolTypes, + ProvisioningState, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + RegularPriorityAllocationStrategy, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + SpotAllocationStrategy, + StorageAccountTypes, + VMAttributeSupport, + VMCategory, + VMOperationStatus, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, + ZoneDistributionStrategy, +) 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__ = [ @@ -203,6 +221,7 @@ "VaultCertificate", "VaultSecretGroup", "VirtualHardDisk", + "VirtualMachine", "VirtualMachineScaleSet", "VirtualMachineScaleSetDataDisk", "VirtualMachineScaleSetExtension", @@ -228,11 +247,14 @@ "WinRMListener", "WindowsConfiguration", "WindowsVMGuestPatchAutomaticByPlatformSettings", + "ZoneAllocationPolicy", + "ZonePreference", "AcceleratorManufacturer", "AcceleratorType", "ActionType", "ArchitectureType", "CachingTypes", + "CapacityType", "CpuManufacturer", "CreatedByType", "DeleteOptions", @@ -243,6 +265,7 @@ "DiskDeleteOptionTypes", "DomainNameLabelScopeTypes", "EvictionPolicy", + "FleetMode", "IPVersion", "LinuxPatchAssessmentMode", "LinuxVMGuestPatchAutomaticByPlatformRebootSetting", @@ -267,9 +290,11 @@ "StorageAccountTypes", "VMAttributeSupport", "VMCategory", + "VMOperationStatus", "WindowsPatchAssessmentMode", "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", + "ZoneDistributionStrategy", ] -__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 dcfe49071def..97668fa29977 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. @@ -59,6 +60,19 @@ class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """'ReadWrite' is default for OS Disk""" +class CapacityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Capacity types for Compute Fleet.""" + + VM = "VM" + """Default. VM is the default capacity type for Compute Fleet where Fleet capacity is provisioned + in terms of VMs.""" + V_CPU = "VCpu" + """VCpu is the capacity type for Compute Fleet where Fleet capacity is provisioned in terms of + VCpus. + If VCpu capacity is not exactly divisible by VCpu count in VMSizes, Fleet capacity in VCpus + will be overprovisioned by default.""" + + class CpuManufacturer(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Cpu Manufacturers supported by Azure VMs.""" @@ -107,9 +121,11 @@ 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,12 +141,14 @@ 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. + `https://aka.ms/azure-diskcontrollertypes `_. """ SCSI = "SCSI" @@ -198,6 +216,15 @@ class EvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """When evicted, the Spot VM will be deallocated/stopped""" +class FleetMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Modes for Compute Fleet.""" + + MANAGED = "Managed" + """Default. Managed is the default mode for Compute Fleet where VMs are provisioned via VMSS.""" + INSTANCE = "Instance" + """Instance mode for Compute Fleet will directly provision VM instances.""" + + class IPVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible @@ -212,9 +239,8 @@ 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.

Possible values are:

**ImageDefault** - You + control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. """ @@ -274,7 +300,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 +500,11 @@ 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" @@ -501,7 +529,7 @@ class VMAttributeSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): EXCLUDED = "Excluded" """All VMSizes having the feature support will be excluded.""" INCLUDED = "Included" - """VMSizes that have the feature support and that do not have the feature support will be used. + """ VMSizes that have the feature support and that do not have the feature support will be used. Included is a union of Excluded and Required.""" REQUIRED = "Required" """Only the VMSizes having the feature support will be used.""" @@ -510,7 +538,8 @@ class VMAttributeSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): class VMCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): """VMCategories defined for Azure VMs. See: - https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose. + `https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose + `_. """ GENERAL_PURPOSE = "GeneralPurpose" @@ -544,6 +573,24 @@ class VMCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): risk analysis.""" +class VMOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Virtual Machine operation status values.""" + + CREATING = "Creating" + """Indicates that the virtual machine is either in the process of being created or is scheduled to + be created.""" + CANCELED = "Canceled" + """Indicates that the cancellation request was successful because the virtual machine had not been + created yet.""" + CANCEL_FAILED_STATUS_UNKNOWN = "CancelFailedStatusUnknown" + """Indicates that the cancellation request could not be applied because the virtual machine had + already been created.""" + FAILED = "Failed" + """Indicates that the virtual machine operation failed.""" + SUCCEEDED = "Succeeded" + """Indicates that the virtual machine operation completed successfully.""" + + class WindowsPatchAssessmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.""" @@ -584,3 +631,14 @@ class WindowsVMGuestPatchMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" """The virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true.""" + + +class ZoneDistributionStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Distribution strategies for Compute Fleet zone allocation policy.""" + + BEST_EFFORT_SINGLE_ZONE = "BestEffortSingleZone" + """Default. Compute Fleet allocates all Fleet capacity within a single zone based on best effort. + If capacity is not available, Compute Fleet can allocate capacity in different zones.""" + PRIORITIZED = "Prioritized" + """Compute Fleet allocates capacity based on zone preferences. + Higher priority zones are filled first before allocating to lower priority zones.""" 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 55e1a980db89..f4f8f73f1f6b 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,18 +6,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=useless-super-delegation import datetime from typing import Any, Dict, List, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload -from .. import _model_base -from .._model_base import rest_field +from .._utils.model_base import Model as _Model, rest_field if TYPE_CHECKING: from .. import models as _models -class AdditionalCapabilities(_model_base.Model): +class AdditionalCapabilities(_Model): """AdditionalCapabilities for VM. :ivar ultra_ssd_enabled: The flag that enables or disables a capability to have one or more @@ -29,12 +29,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,28 +47,29 @@ 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) -class AdditionalLocationsProfile(_model_base.Model): +class AdditionalLocationsProfile(_Model): """Represents the configuration for additional locations where Fleet resources may be deployed. - :ivar location_profiles: The list of location profiles. Required. :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,20 +77,20 @@ 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) -class AdditionalUnattendContent(_model_base.Model): +class AdditionalUnattendContent(_Model): """Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. @@ -106,13 +111,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,20 +140,20 @@ 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) -class ApiEntityReference(_model_base.Model): +class ApiEntityReference(_Model): """The API entity reference. :ivar id: The ARM resource id in the form of @@ -150,7 +161,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,20 +170,20 @@ 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) -class ApiError(_model_base.Model): +class ApiError(_Model): """ApiError for Fleet. :ivar code: The error code. @@ -187,15 +198,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,20 +220,20 @@ 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) -class ApiErrorBase(_model_base.Model): +class ApiErrorBase(_Model): """API error base. :ivar code: The error code. @@ -231,11 +244,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,20 +258,20 @@ 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) -class ApplicationProfile(_model_base.Model): +class ApplicationProfile(_Model): """Contains the list of gallery applications that should be made available to the VM/VMSS. @@ -267,7 +280,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,24 +290,22 @@ 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): """Describes the base virtual machine profile for fleet. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale set. :vartype os_profile: ~azure.mgmt.computefleet.models.VirtualMachineScaleSetOSProfile @@ -315,19 +328,16 @@ 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 - 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 +

Possible values for Windows Server operating system are:

+ Windows_Client

Windows_Server

Possible values for Linux + Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS + (for SUSE)

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. + `_ +

`Azure Hybrid Use Benefit for Linux + Server `_ +

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 +373,78 @@ 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 +

Possible values for Windows Server operating system are:

+ Windows_Client

Windows_Server

Possible values for Linux + Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS + (for SUSE)

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") + `_ +

`Azure Hybrid Use Benefit for Linux + Server `_ +

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,20 +472,20 @@ 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) -class BootDiagnostics(_model_base.Model): +class BootDiagnostics(_Model): """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the @@ -470,9 +499,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,34 +514,38 @@ 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) -class CapacityReservationProfile(_model_base.Model): +class CapacityReservationProfile(_Model): """The parameters of a capacity reservation Profile. :ivar capacity_reservation_group: 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 + capacity has been reserved. Please refer to `https://aka.ms/CapacityReservation + `_ for more details. :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 + capacity has been reserved. Please refer to `https://aka.ms/CapacityReservation + `_ for more details.""" @overload @@ -518,26 +553,25 @@ 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) -class ComputeProfile(_model_base.Model): +class ComputeProfile(_Model): """Compute Profile to use for running user's workloads. - :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 +596,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 +618,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,34 +634,36 @@ 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) -class DiagnosticsProfile(_model_base.Model): +class DiagnosticsProfile(_Model): """Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view Console Output - and Screenshot to diagnose VM status. **NOTE**\\ : If storageUri is being + and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. :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 + and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.""" @@ -631,20 +673,20 @@ 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) -class DiffDiskSettings(_model_base.Model): +class DiffDiskSettings(_Model): """Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk. @@ -655,21 +697,29 @@ 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,30 +729,30 @@ 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) -class DiskEncryptionSetParameters(_model_base.Model): +class DiskEncryptionSetParameters(_Model): """Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer - https://aka.ms/mdssewithcmkoverview for more details. + `https://aka.ms/mdssewithcmkoverview `_ for more details. :ivar id: Resource Id. :vartype id: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource Id.""" @overload @@ -710,20 +760,20 @@ 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) -class EncryptionIdentity(_model_base.Model): +class EncryptionIdentity(_Model): """Specifies the Managed Identity used by ADE to get access token for keyvault operations. @@ -732,7 +782,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,24 +792,22 @@ 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) -class ErrorAdditionalInfo(_model_base.Model): +class ErrorAdditionalInfo(_Model): """The resource management error additional info. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. @@ -770,11 +820,9 @@ class ErrorAdditionalInfo(_model_base.Model): """The additional info.""" -class ErrorDetail(_model_base.Model): +class ErrorDetail(_Model): """The error detail. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. :vartype code: str :ivar message: The error message. @@ -801,15 +849,14 @@ class ErrorDetail(_model_base.Model): """The error additional info.""" -class ErrorResponse(_model_base.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. +class ErrorResponse(_Model): + """Error response. :ivar error: The error object. :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,26 +864,24 @@ 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) -class Resource(_model_base.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Readonly variables are only populated by the server, and will be ignored when sending a request. +class Resource(_Model): + """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 @@ -850,7 +895,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"]) @@ -861,14 +906,10 @@ class Resource(_model_base.Model): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which - has 'tags' and a 'location'. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - + """Tracked 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 +925,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,27 +936,24 @@ 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) class Fleet(TrackedResource): """An Compute Fleet resource. - 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 @@ -939,13 +977,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,25 +1000,22 @@ 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) -class FleetProperties(_model_base.Model): +class FleetProperties(_Model): """Details of the Compute Fleet. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting", and "Migrating". :vartype provisioning_state: str or ~azure.mgmt.computefleet.models.ProvisioningState @@ -998,6 +1037,15 @@ class FleetProperties(_model_base.Model): :vartype time_created: ~datetime.datetime :ivar unique_id: Specifies the ID which uniquely identifies a Compute Fleet. :vartype unique_id: str + :ivar mode: Mode of the Fleet. Known values are: "Managed" and "Instance". + :vartype mode: str or ~azure.mgmt.computefleet.models.FleetMode + :ivar capacity_type: Specifies capacity type for Fleet Regular and Spot priority profiles. + capacityType is an immutable property. Once set during Fleet creation, it cannot be updated. + Specifying different capacity type for Fleet Regular and Spot priority profiles is not allowed. + Known values are: "VM" and "VCpu". + :vartype capacity_type: str or ~azure.mgmt.computefleet.models.CapacityType + :ivar zone_allocation_policy: Zone Allocation Policy for Fleet. + :vartype zone_allocation_policy: ~azure.mgmt.computefleet.models.ZoneAllocationPolicy """ provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( @@ -1005,24 +1053,49 @@ 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.""" unique_id: Optional[str] = rest_field(name="uniqueId", visibility=["read"]) """Specifies the ID which uniquely identifies a Compute Fleet.""" + mode: Optional[Union[str, "_models.FleetMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mode of the Fleet. Known values are: \"Managed\" and \"Instance\".""" + capacity_type: Optional[Union[str, "_models.CapacityType"]] = rest_field( + name="capacityType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies capacity type for Fleet Regular and Spot priority profiles. + capacityType is an immutable property. Once set during Fleet creation, it cannot be updated. + Specifying different capacity type for Fleet Regular and Spot priority profiles is not allowed. + Known values are: \"VM\" and \"VCpu\".""" + zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = rest_field( + name="zoneAllocationPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Zone Allocation Policy for Fleet.""" @overload def __init__( @@ -1034,20 +1107,23 @@ def __init__( regular_priority_profile: Optional["_models.RegularPriorityProfile"] = None, vm_attributes: Optional["_models.VMAttributes"] = None, additional_locations_profile: Optional["_models.AdditionalLocationsProfile"] = None, - ): ... + mode: Optional[Union[str, "_models.FleetMode"]] = None, + capacity_type: Optional[Union[str, "_models.CapacityType"]] = None, + zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = 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 FleetUpdate(_model_base.Model): +class FleetUpdate(_Model): """Fleet Update Model. :ivar tags: Resource tags. @@ -1060,13 +1136,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,28 +1159,26 @@ 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) -class ImageReference(_model_base.Model): +class ImageReference(_Model): """Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id. :vartype id: str :ivar publisher: The image publisher. @@ -1116,7 +1196,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 +1213,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 +1231,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,20 +1259,20 @@ 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) -class InnerError(_model_base.Model): +class InnerError(_Model): """Inner error details. :ivar exception_type: The exception type. @@ -1197,9 +1281,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,32 +1296,33 @@ 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) -class KeyVaultSecretReference(_model_base.Model): +class KeyVaultSecretReference(_Model): """Describes a reference to Key Vault Secret. - :ivar secret_url: The URL referencing a secret in a Key Vault. Required. :vartype secret_url: str :ivar source_vault: The relative URL of the Key Vault containing the secret. Required. :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 +1331,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): +class LinuxConfiguration(_Model): """Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see `Linux on Azure-Endorsed - Distributions `_. + Distributions `_. :ivar disable_password_authentication: Specifies whether password authentication should be disabled. @@ -1280,18 +1369,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,35 +1401,33 @@ 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) -class LinuxPatchSettings(_model_base.Model): +class LinuxPatchSettings(_Model): """Specifies settings related to VM Guest Patching on Linux. :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.

Possible values are:

**ImageDefault** - The + virtual machine's default patching configuration is used.

**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.

Possible values are:

**ImageDefault** - You + control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Known values are: "ImageDefault" and "AutomaticByPlatform". @@ -1344,25 +1439,27 @@ 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:`
` - **ImageDefault** - The - virtual machine's default patching configuration is used. :code:`
`:code:`
` + Flexible.

Possible values are:

**ImageDefault** - The + virtual machine's default patching configuration is used.

**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:`
` - **ImageDefault** - You - control the timing of patch assessments on a virtual machine. :code:`
`:code:`
` + machine.

Possible values are:

**ImageDefault** - You + control the timing of patch assessments on a virtual machine.

**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,20 +1471,20 @@ 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) -class LinuxVMGuestPatchAutomaticByPlatformSettings(_model_base.Model): # pylint: disable=name-too-long +class LinuxVMGuestPatchAutomaticByPlatformSettings(_Model): # pylint: disable=name-too-long """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings. @@ -1402,12 +1499,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,24 +1514,23 @@ 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) -class LocationProfile(_model_base.Model): +class LocationProfile(_Model): """Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride (optional). - :ivar location: The ARM location name of the additional region. If LocationProfile is specified, then location is required. Required. :vartype location: str @@ -1446,11 +1542,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,25 +1558,22 @@ 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) -class ManagedServiceIdentity(_model_base.Model): +class ManagedServiceIdentity(_Model): """Managed service identity (system assigned and/or user assigned identities). - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. :vartype principal_id: str @@ -1501,11 +1594,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,20 +1610,20 @@ 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) -class ManagedServiceIdentityUpdate(_model_base.Model): +class ManagedServiceIdentityUpdate(_Model): """The template for adding optional properties. :ivar type: The type of managed identity assigned to this resource. Known values are: "None", @@ -1539,11 +1634,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,23 +1650,21 @@ 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) -class Operation(_model_base.Model): - """Details of a REST API operation, returned from the Resource Provider Operations API. - - Readonly variables are only populated by the server, and will be ignored when sending a request. +class Operation(_Model): + """REST API Operation. :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". @@ -1595,13 +1690,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,25 +1706,23 @@ 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) -class OperationDisplay(_model_base.Model): +class OperationDisplay(_Model): """Localized display information for and operation. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". :vartype provider: str @@ -1656,7 +1751,7 @@ class OperationDisplay(_model_base.Model): views.""" -class OSImageNotificationProfile(_model_base.Model): +class OSImageNotificationProfile(_Model): """Specifies OS Image Scheduled Event related configurations. :ivar not_before_timeout: Length of time a Virtual Machine being reimaged or having its OS @@ -1669,12 +1764,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,33 +1780,31 @@ 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) -class PatchSettings(_model_base.Model): +class PatchSettings(_Model): """Specifies settings related to VM Guest Patching on Windows. :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.

Possible values are:

**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

**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.

**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 +1815,8 @@ 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.

Possible values are:

**ImageDefault** - You + control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Known values are: "ImageDefault" and "AutomaticByPlatform". @@ -1734,34 +1828,38 @@ 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:`
` - **Manual** - You + Flexible.

Possible values are:

**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

**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.

**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:`
` - **ImageDefault** - You - control the timing of patch assessments on a virtual machine.:code:`
`:code:`
` + machine.

Possible values are:

**ImageDefault** - You + control the timing of patch assessments on a virtual machine.

**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,23 +1872,22 @@ 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) -class Plan(_model_base.Model): +class Plan(_Model): """Plan for the resource. - :ivar name: A user defined name of the 3rd Party Artifact that is being procured. Required. :vartype name: str :ivar publisher: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. @@ -1806,17 +1903,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,20 +1927,20 @@ 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) -class ProxyAgentSettings(_model_base.Model): +class ProxyAgentSettings(_Model): """Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2023-09-01. @@ -1859,15 +1958,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,20 +1979,20 @@ 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) -class PublicIPAddressSku(_model_base.Model): +class PublicIPAddressSku(_Model): """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. @@ -1901,9 +2002,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,20 +2017,20 @@ 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) -class RegularPriorityProfile(_model_base.Model): +class RegularPriorityProfile(_Model): """Configuration Options for Regular instances in Compute Fleet. :ivar capacity: Total capacity to achieve. It is currently in terms of number of VMs. @@ -1939,13 +2044,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,20 +2064,20 @@ 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) -class ResourcePlanUpdate(_model_base.Model): +class ResourcePlanUpdate(_Model): """The template for adding optional properties. :ivar name: A user defined name of the 3rd Party Artifact that is being procured. @@ -1987,17 +2094,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,20 +2118,20 @@ 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) -class ScheduledEventsProfile(_model_base.Model): +class ScheduledEventsProfile(_Model): """Specifies Scheduled Event related configurations. :ivar terminate_notification_profile: Specifies Terminate Scheduled Event related @@ -2035,11 +2144,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,25 +2158,25 @@ 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) -class SecurityPostureReference(_model_base.Model): +class SecurityPostureReference(_Model): """Specifies the security posture to be used for all virtual machines in the scale 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 +2186,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,20 +2206,20 @@ 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) -class SecurityProfile(_model_base.Model): +class SecurityProfile(_Model): """Specifies the Security profile settings for the virtual machine or virtual machine scale set. @@ -2136,24 +2249,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,52 +2289,52 @@ 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) -class ServiceArtifactReference(_model_base.Model): +class ServiceArtifactReference(_Model): """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. :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) -class SpotPriorityProfile(_model_base.Model): +class SpotPriorityProfile(_Model): """Configuration Options for Spot instances in Compute Fleet. :ivar capacity: Total capacity to achieve. It is currently in terms of number of VMs. @@ -2238,20 +2361,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,27 +2401,29 @@ 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) -class SshConfiguration(_model_base.Model): +class SshConfiguration(_Model): """SSH configuration for Linux based VMs running on Azure. :ivar public_keys: The list of SSH public keys used to authenticate with linux based VMs. :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,20 +2431,20 @@ 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) -class SshPublicKey(_model_base.Model): +class SshPublicKey(_Model): """Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. @@ -2322,19 +2455,21 @@ 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,27 +2477,27 @@ 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) -class SubResource(_model_base.Model): +class SubResource(_Model): """Describes SubResource. :ivar id: Resource Id. :vartype id: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource Id.""" @overload @@ -2370,20 +2505,20 @@ 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) -class SystemData(_model_base.Model): +class SystemData(_Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. @@ -2402,19 +2537,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,20 +2572,20 @@ 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) -class TerminateNotificationProfile(_model_base.Model): +class TerminateNotificationProfile(_Model): """Specifies Terminate Scheduled Event related configurations. :ivar not_before_timeout: Configurable length of time a Virtual Machine being deleted will have @@ -2453,12 +2598,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,20 +2614,20 @@ 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) -class UefiSettings(_model_base.Model): +class UefiSettings(_Model): """Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. @@ -2493,10 +2640,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,24 +2657,22 @@ 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) -class UserAssignedIdentity(_model_base.Model): +class UserAssignedIdentity(_Model): """User assigned identity properties. - 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. @@ -2536,7 +2685,7 @@ class UserAssignedIdentity(_model_base.Model): """The client ID of the assigned identity.""" -class VaultCertificate(_model_base.Model): +class VaultCertificate(_Model): """Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. @@ -2544,17 +2693,16 @@ 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:

{
+ "data":"",
"dataType":"pfx",
+ "password":""
}
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 +2715,25 @@ 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:

{
+ \"data\":\"\",
\"dataType\":\"pfx\",
+ \"password\":\"\"
}
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,20 +2748,20 @@ 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) -class VaultSecretGroup(_model_base.Model): +class VaultSecretGroup(_Model): """Describes a set of certificates which are all in the same Key Vault. :ivar source_vault: The relative URL of the Key Vault containing all of the certificates in @@ -2622,10 +2772,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,27 +2788,27 @@ 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) -class VirtualHardDisk(_model_base.Model): +class VirtualHardDisk(_Model): """Describes the uri of a disk. :ivar uri: Specifies the virtual hard disk's uri. :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,27 +2816,55 @@ 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) -class VirtualMachineScaleSet(_model_base.Model): - """An AzureFleet's virtualMachineScaleSet. +class VirtualMachine(_Model): + """An instant Fleet's virtual machine. + + :ivar id: The compute RP resource id of the virtual machine. + subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}. + Required. + :vartype id: str + :ivar type: Type of the virtual machine. + :vartype type: str + :ivar operation_status: This represents the operationStatus of the virtual machine in response + to the last operation that was performed on it by Azure Fleet resource. Required. Known values + are: "Creating", "Canceled", "CancelFailedStatusUnknown", "Failed", and "Succeeded". + :vartype operation_status: str or ~azure.mgmt.computefleet.models.VMOperationStatus + :ivar error: Error information when ``operationStatus`` is ``Failed``. + :vartype error: ~azure.mgmt.computefleet.models.ApiError + """ - Readonly variables are only populated by the server, and will be ignored when sending a request. + id: str = rest_field(visibility=["read"]) + """The compute RP resource id of the virtual machine. + subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}. + Required.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Type of the virtual machine.""" + operation_status: Union[str, "_models.VMOperationStatus"] = rest_field(name="operationStatus", visibility=["read"]) + """This represents the operationStatus of the virtual machine in response to the last operation + that was performed on it by Azure Fleet resource. Required. Known values are: \"Creating\", + \"Canceled\", \"CancelFailedStatusUnknown\", \"Failed\", and \"Succeeded\".""" + error: Optional["_models.ApiError"] = rest_field(visibility=["read"]) + """Error information when ``operationStatus`` is ``Failed``.""" +class VirtualMachineScaleSet(_Model): + """An AzureFleet's virtualMachineScaleSet. + :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. @@ -2709,10 +2891,9 @@ class VirtualMachineScaleSet(_model_base.Model): """Error Information when ``operationStatus`` is ``Failed``.""" -class VirtualMachineScaleSetDataDisk(_model_base.Model): +class VirtualMachineScaleSetDataDisk(_Model): """Describes a virtual machine scale set data disk. - :ivar name: The disk name. :vartype name: str :ivar lun: Specifies the logical unit number of the data disk. This value is used to @@ -2751,55 +2932,69 @@ 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).

Possible values:

**Delete** If this value is used, the + data disk is deleted when the VMSS Flex VM is deleted.

**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.

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).

Possible values:

**Delete** If this value is used, the + data disk is deleted when the VMSS Flex VM is deleted.

**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.

The default value is set to **Delete**. Known values are: \"Delete\" and + \"Detach\".""" @overload def __init__( @@ -2815,24 +3010,22 @@ 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) -class VirtualMachineScaleSetExtension(_model_base.Model): +class VirtualMachineScaleSetExtension(_Model): """Describes a Virtual Machine Scale Set Extension. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id. :vartype id: str :ivar name: The name of the extension. @@ -2845,11 +3038,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,20 +3053,20 @@ 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) -class VirtualMachineScaleSetExtensionProfile(_model_base.Model): +class VirtualMachineScaleSetExtensionProfile(_Model): """Describes a virtual machine scale set extension profile. :ivar extensions: The virtual machine scale set child extension resources. @@ -2884,9 +3079,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,26 +3097,22 @@ 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): # 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. - :ivar force_update_tag: If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not @@ -2961,39 +3156,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,20 +3220,20 @@ 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) -class VirtualMachineScaleSetHardwareProfile(_model_base.Model): +class VirtualMachineScaleSetHardwareProfile(_Model): """Specifies the hardware settings for the virtual machine scale set. :ivar vm_size_properties: Specifies the properties for customizing the size of the virtual @@ -3036,7 +3243,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,23 +3255,22 @@ 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) -class VirtualMachineScaleSetIPConfiguration(_model_base.Model): +class VirtualMachineScaleSetIPConfiguration(_Model): """Describes a virtual machine scale set network profile's IP configuration. - :ivar name: The IP configuration name. Required. :vartype name: str :ivar properties: Describes a virtual machine scale set network profile's IP configuration @@ -3071,9 +3279,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,20 +3293,20 @@ 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) -class VirtualMachineScaleSetIPConfigurationProperties(_model_base.Model): # pylint: disable=name-too-long +class VirtualMachineScaleSetIPConfigurationProperties(_Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's IP configuration properties. @@ -3135,36 +3345,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,20 +3398,20 @@ 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) -class VirtualMachineScaleSetIpTag(_model_base.Model): +class VirtualMachineScaleSetIpTag(_Model): """Contains the IP tag associated with the public IP address. :ivar ip_tag_type: IP tag type. Example: FirstPartyUsage. @@ -3204,9 +3420,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,27 +3433,27 @@ 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) -class VirtualMachineScaleSetManagedDiskParameters(_model_base.Model): # pylint: disable=name-too-long +class VirtualMachineScaleSetManagedDiskParameters(_Model): # pylint: disable=name-too-long """Describes the parameters of a ScaleSet managed disk. :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 +3463,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,23 +3487,22 @@ 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) -class VirtualMachineScaleSetNetworkConfiguration(_model_base.Model): # pylint: disable=name-too-long +class VirtualMachineScaleSetNetworkConfiguration(_Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. - :ivar name: The network configuration name. Required. :vartype name: str :ivar properties: Describes a virtual machine scale set network profile's IP configuration. @@ -3287,9 +3510,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,27 +3523,29 @@ 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) -class VirtualMachineScaleSetNetworkConfigurationDnsSettings(_model_base.Model): # pylint: disable=name-too-long +class VirtualMachineScaleSetNetworkConfigurationDnsSettings(_Model): # pylint: disable=name-too-long """Describes a virtual machines scale sets network configuration's DNS settings. :ivar dns_servers: List of DNS servers IP addresses. :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,25 +3553,22 @@ 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): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's IP configuration. - :ivar primary: Specifies the primary network interface in case the virtual machine has more than 1 network interface. :vartype primary: bool @@ -3377,32 +3601,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,25 +3663,25 @@ 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) -class VirtualMachineScaleSetNetworkProfile(_model_base.Model): +class VirtualMachineScaleSetNetworkProfile(_Model): """Describes a virtual machine scale set network profile. :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 +3693,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,23 +3717,22 @@ 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): """Describes a virtual machine scale set operating system disk. - :ivar name: The disk name. :vartype name: str :ivar caching: Specifies the caching requirements. Possible values are: **None,** @@ -3532,58 +3777,74 @@ 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 +

Possible values:

**Delete** If this value is used, the OS + disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value + is used, the OS disk is retained after VMSS Flex VM is deleted.

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 +

Possible values:

**Delete** If this value is used, the OS + disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value + is used, the OS disk is retained after VMSS Flex VM is deleted.

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,61 +3864,58 @@ 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) -class VirtualMachineScaleSetOSProfile(_model_base.Model): +class VirtualMachineScaleSetOSProfile(_Model): """Describes a virtual machine scale set OS profile. :ivar computer_name_prefix: Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. :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.

**Windows-only + restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". - :code:`
`:code:`
` **Minimum-length (Linux):** 1 character :code:`
`:code:`
` - **Max-length - (Linux):** 64 characters :code:`
`:code:`
` **Max-length (Windows):** 20 characters. +

**Minimum-length (Linux):** 1 character

**Max-length + (Linux):** 64 characters

**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 - 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", + :ivar admin_password: Specifies the password of the administrator account.

+ **Minimum-length + (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters +

**Max-length (Windows):** 123 characters

**Max-length + (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled
Has lower characters
Has upper + characters
Has a digit
Has a special character (Regex match [\\W_]) +

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", - "Password22", "iloveyou!" :code:`
`:code:`
` For resetting the password, see `How to + "Password22", "iloveyou!"

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 `_ +

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 +3923,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 +3942,72 @@ 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.

**Windows-only + restriction:** Cannot end in \".\"

**Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\". - :code:`
`:code:`
` **Minimum-length (Linux):** 1 character :code:`
`:code:`
` - **Max-length - (Linux):** 64 characters :code:`
`:code:`
` **Max-length (Windows):** 20 characters.""" +

**Minimum-length (Linux):** 1 character

**Max-length + (Linux):** 64 characters

**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:`
` - **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\", + """Specifies the password of the administrator account.

**Minimum-length + (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters +

**Max-length (Windows):** 123 characters

**Max-length + (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled
Has lower characters
Has upper + characters
Has a digit
Has a special character (Regex match [\W_]) +

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", - \"Password22\", \"iloveyou!\" :code:`
`:code:`
` For resetting the password, see `How to + \"Password22\", \"iloveyou!\"

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 `_ +

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,24 +4023,23 @@ 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) -class VirtualMachineScaleSetPublicIPAddressConfiguration(_model_base.Model): # pylint: disable=name-too-long +class VirtualMachineScaleSetPublicIPAddressConfiguration(_Model): # pylint: disable=name-too-long """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. - :ivar name: The publicIP address configuration name. Required. :vartype name: str :ivar properties: Describes a virtual machines scale set IP Configuration's PublicIPAddress @@ -3782,12 +4051,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,23 +4069,22 @@ 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) -class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(_model_base.Model): # pylint: disable=name-too-long +class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(_Model): # pylint: disable=name-too-long """Describes a virtual machines scale sets network configuration's DNS settings. - :ivar domain_name_label: The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be @@ -3830,12 +4100,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,20 +4121,20 @@ 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) -class VirtualMachineScaleSetPublicIPAddressConfigurationProperties(_model_base.Model): # pylint: disable=name-too-long +class VirtualMachineScaleSetPublicIPAddressConfigurationProperties(_Model): # pylint: disable=name-too-long """Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. @@ -3885,21 +4157,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,20 +4195,20 @@ 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) -class VirtualMachineScaleSetStorageProfile(_model_base.Model): +class VirtualMachineScaleSetStorageProfile(_Model): """Describes a virtual machine scale set storage profile. :ivar image_reference: Specifies information about the image to use. You can specify @@ -3938,12 +4220,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 +4233,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,20 +4268,20 @@ 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) -class VMAttributeMinMaxDouble(_model_base.Model): +class VMAttributeMinMaxDouble(_Model): """VMAttributes using double values. :ivar min: Minimum value. default 0. Double.MinValue(). @@ -4000,9 +4290,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,20 +4301,20 @@ 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) -class VMAttributeMinMaxInteger(_model_base.Model): +class VMAttributeMinMaxInteger(_Model): """While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes. @@ -4034,9 +4324,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,23 +4335,22 @@ 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): """VMAttributes that will be used to filter VMSizes which will be used to build Fleet. - :ivar v_cpu_count: 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. :vartype v_cpu_count: ~azure.mgmt.computefleet.models.VMAttributeMinMaxInteger @@ -4072,7 +4361,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 +4426,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,20 +4557,20 @@ 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) -class VMDiskSecurityProfile(_model_base.Model): +class VMDiskSecurityProfile(_Model): """Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs. @@ -4264,7 +4590,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 +4598,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,30 +4611,29 @@ 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) -class VMGalleryApplication(_model_base.Model): +class VMGalleryApplication(_Model): """Specifies the required information to reference a compute gallery application version. - :ivar tags: Optional, Specifies a passthrough value for more generic context. :vartype tags: str :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 +4650,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,24 +4686,23 @@ 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) -class VmSizeProfile(_model_base.Model): +class VmSizeProfile(_Model): """Specifications about a VM Size. This will also contain the corresponding rank and weight in future. - :ivar name: The Sku name (e.g. 'Standard_DS1_v2'). Required. :vartype name: str :ivar rank: The rank of the VM size. This is used with @@ -4377,9 +4711,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,20 +4723,20 @@ 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) -class VMSizeProperties(_model_base.Model): +class VMSizeProperties(_Model): """Specifies VM Size Property settings on the virtual machine. :ivar v_cpus_available: Specifies the number of vCPUs available for the VM. When this property @@ -4410,30 +4744,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,20 +4780,20 @@ 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) -class WindowsConfiguration(_model_base.Model): +class WindowsConfiguration(_Model): """Specifies Windows operating system settings on the virtual machine. :ivar provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the @@ -4472,10 +4810,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 +4832,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,20 +4884,20 @@ 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) -class WindowsVMGuestPatchAutomaticByPlatformSettings(_model_base.Model): # pylint: disable=name-too-long +class WindowsVMGuestPatchAutomaticByPlatformSettings(_Model): # pylint: disable=name-too-long """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings. @@ -4564,12 +4912,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,27 +4927,29 @@ 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) -class WinRMConfiguration(_model_base.Model): +class WinRMConfiguration(_Model): """Describes Windows Remote Management configuration of the VM. :ivar listeners: The list of Windows Remote Management listeners. :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,20 +4957,20 @@ 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) -class WinRMListener(_model_base.Model): +class WinRMListener(_Model): """Describes Protocol and thumbprint of Windows Remote Management listener. :ivar protocol: Specifies the protocol of WinRM listener. Possible values are: **http,** @@ -4630,39 +4980,40 @@ 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:

{
+ "data":"",
"dataType":"pfx",
+ "password":""
}
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:

{
+ \"data\":\"\",
\"dataType\":\"pfx\",
+ \"password\":\"\"
}
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 +5021,91 @@ def __init__( *, protocol: Optional[Union[str, "_models.ProtocolTypes"]] = None, certificate_url: Optional[str] = None, - ): ... + ) -> None: ... + + @overload + 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: + super().__init__(*args, **kwargs) + + +class ZoneAllocationPolicy(_Model): + """ZoneAllocationPolicy for Compute Fleet. + + :ivar distribution_strategy: Distribution strategy used for zone allocation policy. Required. + Known values are: "BestEffortSingleZone" and "Prioritized". + :vartype distribution_strategy: str or ~azure.mgmt.computefleet.models.ZoneDistributionStrategy + :ivar zone_preferences: Zone preferences, required when zone distribution strategy is + Prioritized. + :vartype zone_preferences: list[~azure.mgmt.computefleet.models.ZonePreference] + """ + + distribution_strategy: Union[str, "_models.ZoneDistributionStrategy"] = rest_field( + name="distributionStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """Distribution strategy used for zone allocation policy. Required. Known values are: + \"BestEffortSingleZone\" and \"Prioritized\".""" + zone_preferences: Optional[List["_models.ZonePreference"]] = rest_field( + name="zonePreferences", visibility=["read", "create", "update", "delete", "query"] + ) + """Zone preferences, required when zone distribution strategy is Prioritized.""" + + @overload + def __init__( + self, + *, + distribution_strategy: Union[str, "_models.ZoneDistributionStrategy"], + zone_preferences: Optional[List["_models.ZonePreference"]] = None, + ) -> None: ... + + @overload + 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: + super().__init__(*args, **kwargs) + + +class ZonePreference(_Model): + """Zone preferences for Compute Fleet zone allocation policy. + + :ivar zone: Name of the zone. Required. + :vartype zone: str + :ivar rank: The rank of the zone. This is used with 'Prioritized' ZoneDistributionStrategy. + The lower the number, the higher the priority, starting with 0. + 0 is the highest rank. If not specified, defaults to lowest rank. + :vartype rank: int + """ + + zone: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the zone. Required.""" + rank: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The rank of the zone. This is used with 'Prioritized' ZoneDistributionStrategy. + The lower the number, the higher the priority, starting with 0. + 0 is the highest rank. If not specified, defaults to lowest rank.""" + + @overload + def __init__( + self, + *, + zone: 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) diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize 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 180cf6d7d211..5134d89815cb 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 c953d1c9303e..47ddac589da8 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. @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -32,16 +33,14 @@ 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 .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer +from .._validation import api_version_validation -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -51,7 +50,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,11 +71,11 @@ def build_fleets_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) 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"), @@ -101,11 +100,11 @@ def build_fleets_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) 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"), @@ -132,11 +131,11 @@ def build_fleets_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) 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"), @@ -159,14 +158,11 @@ def build_fleets_update_request( def build_fleets_delete_request( resource_group_name: str, fleet_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) # 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"), @@ -178,10 +174,7 @@ def build_fleets_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_fleets_list_by_resource_group_request( # pylint: disable=name-too-long @@ -190,7 +183,7 @@ def build_fleets_list_by_resource_group_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -217,7 +210,7 @@ def build_fleets_list_by_subscription_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -243,11 +236,45 @@ def build_fleets_list_virtual_machine_scale_sets_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _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"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_fleets_list_virtual_machines_request( # pylint: disable=name-too-long + resource_group_name: str, + name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + skiptoken: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) 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}/virtualMachines" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -258,6 +285,10 @@ def build_fleets_list_virtual_machine_scale_sets_request( # pylint: disable=nam # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if skiptoken is not None: + _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -265,6 +296,28 @@ def build_fleets_list_virtual_machine_scale_sets_request( # pylint: disable=nam return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_fleets_cancel_request( + resource_group_name: str, fleet_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}/cancel" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "fleetName": _SERIALIZER.url("fleet_name", fleet_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + class Operations: """ .. warning:: @@ -275,15 +328,15 @@ class Operations: :attr:`operations` attribute. """ - def __init__(self, *args, **kwargs): + 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: 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"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: """List the operations for the provider. :return: An iterator like instance of Operation @@ -342,7 +395,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -358,7 +411,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -376,12 +429,12 @@ class FleetsOperations: :attr:`fleets` attribute. """ - def __init__(self, *args, **kwargs): + 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: 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 +489,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -501,7 +554,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -726,7 +779,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -940,7 +993,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1013,7 +1066,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Fleet"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Fleet"]: """List Fleet resources by resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1077,7 +1130,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Fleet], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Fleet], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1093,7 +1146,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1101,7 +1154,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.Fleet"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.Fleet"]: """List Fleet resources by subscription ID. :return: An iterator like instance of Fleet @@ -1161,7 +1214,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Fleet], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Fleet], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1177,7 +1230,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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1187,7 +1240,7 @@ def get_next(next_link=None): @distributed_trace def list_virtual_machine_scale_sets( self, resource_group_name: str, name: str, **kwargs: Any - ) -> Iterable["_models.VirtualMachineScaleSet"]: + ) -> ItemPaged["_models.VirtualMachineScaleSet"]: """List VirtualMachineScaleSet resources by Fleet. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1254,7 +1307,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.VirtualMachineScaleSet], deserialized["value"]) + list_of_elem = _deserialize(List[_models.VirtualMachineScaleSet], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1270,9 +1323,251 @@ 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) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-01-preview", + params_added_on={ + "2025-07-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "name", + "filter", + "skiptoken", + "accept", + ] + }, + api_versions_list=["2025-07-01-preview"], + ) + def list_virtual_machines( + self, + resource_group_name: str, + name: str, + *, + filter: Optional[str] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.VirtualMachine"]: + """List VirtualMachine resources of an instance Fleet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param name: The name of the Fleet. Required. + :type name: str + :keyword filter: Filter expression to filter the virtual machines. Default value is None. + :paramtype filter: str + :keyword skiptoken: Skip token for pagination. Uses the token from a previous response to fetch + the next page of results. Default value is None. + :paramtype skiptoken: str + :return: An iterator like instance of VirtualMachine + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.computefleet.models.VirtualMachine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.VirtualMachine]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_fleets_list_virtual_machines_request( + resource_group_name=resource_group_name, + name=name, + subscription_id=self._config.subscription_id, + filter=filter, + skiptoken=skiptoken, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.VirtualMachine], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-01-preview", + params_added_on={"2025-07-01-preview": ["api_version", "subscription_id", "resource_group_name", "fleet_name"]}, + api_versions_list=["2025-07-01-preview"], + ) + def _cancel_initial(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_fleets_cancel_request( + resource_group_name=resource_group_name, + fleet_name=fleet_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-01-preview", + params_added_on={"2025-07-01-preview": ["api_version", "subscription_id", "resource_group_name", "fleet_name"]}, + api_versions_list=["2025-07-01-preview"], + ) + def begin_cancel(self, resource_group_name: str, fleet_name: str, **kwargs: Any) -> LROPoller[None]: + """Cancels an instance Fleet creation that is in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param fleet_name: The name of the Compute Fleet. Required. + :type fleet_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + fleet_name=fleet_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_cancel.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_cancel.py new file mode 100644 index 000000000000..cb991c18bb2e --- /dev/null +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_cancel.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.computefleet import ComputeFleetMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-computefleet +# USAGE + python fleets_cancel.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ComputeFleetMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.fleets.begin_cancel( + resource_group_name="rgazurefleet", + fleet_name="myFleet", + ).result() + + +# x-ms-original-file: 2025-07-01-preview/Fleets_Cancel.json +if __name__ == "__main__": + main() 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 3c182d5204c2..0ded30b9e005 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. @@ -32,9 +33,9 @@ def main(): response = client.fleets.begin_create_or_update( resource_group_name="rgazurefleet", - fleet_name="testFleet", + fleet_name="myFleet", resource={ - "identity": {"type": "UserAssigned", "userAssignedIdentities": {"key9851": {}}}, + "identity": {"type": "UserAssigned", "userAssignedIdentities": {}}, "location": "westus", "plan": { "name": "jwgrcrnrtfoxn", @@ -44,7 +45,297 @@ def main(): "version": "wa", }, "properties": { + "additionalLocationsProfile": { + "locationProfiles": [ + { + "location": "ekbzgzhs", + "virtualMachineProfileOverride": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "gqxsvizquzglpsgqaundtyh", + "enableAutomaticUpgrade": True, + "order": 19, + "packageReferenceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}", + "tags": "fronuehbtzhxaoijmdmjzwaswgevh", + "treatFailureAsDeploymentFailure": True, + } + ] + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": {"enabled": True, "storageUri": "https://microsoft.com/a"} + }, + "extensionProfile": { + "extensions": [ + { + "name": "dockglmmvl", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "wzyqlpszoiewqbhlnzckfshdtpwkbd", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://microsoft.com/ahygahgb", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + }, + }, + "provisionAfterExtensions": ["rqrycujrpdodllirebkfg"], + "publisher": "iikgjziralgrfsrxrlrdigqyfhuqg", + "settings": {}, + "suppressFailures": True, + "type": "xzhgosms", + "typeHandlerVersion": "mfzdzdwucagkogmxoosyjpej", + }, + } + ], + "extensionsTimeBudget": "srxtwxrc", + }, + "hardwareProfile": {"vmSizeProperties": {"vCPUsAvailable": 1, "vCPUsPerCore": 4}}, + "licenseType": "hilutelnuqxtpdznq", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "uyemquurltujhbjkhm", + "properties": { + "auxiliaryMode": "None", + "auxiliarySku": "None", + "deleteOption": "Delete", + "disableTcpStateTracking": True, + "dnsSettings": {"dnsServers": ["ajcsckebabrus"]}, + "enableAcceleratedNetworking": True, + "enableFpga": True, + "enableIPForwarding": True, + "ipConfigurations": [ + { + "name": "xpwuwsvkuml", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + ], + "primary": True, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "wbpdlbxflssopphq", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "uwjtwqgwalsctypszcbnxo", + "domainNameLabelScope": "TenantReuse", + }, + "idleTimeoutInMinutes": 9, + "ipTags": [ + { + "ipTagType": "hxkbmbisknggtfdqoaqagjhipdkd", + "tag": "vzxhyyrzieaocbxyxieivj", + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + }, + }, + "sku": {"name": "Basic", "tier": "Regional"}, + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + }, + }, + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + }, + "primary": True, + }, + } + ], + }, + "osProfile": { + "adminPassword": "", + "adminUsername": "wwjyuhblwecni", + "allowExtensionOperations": True, + "computerNamePrefix": "xoxwfnjjuqibzxldgxu", + "customData": "gvyvbgcgutteiivwjn", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "patchMode": "ImageDefault", + }, + "provisionVMAgent": True, + "ssh": {"publicKeys": [{"keyData": "meokrrrddgnyxyhg", "path": "bci"}]}, + }, + "requireGuestProvisionSignal": True, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + }, + "vaultCertificates": [ + { + "certificateStore": "hdts", + "certificateUrl": "https://microsoft.com/a", + } + ], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "ynkrgbreqtuxgftjgeuvozzypzx", + "passName": "OobeSystem", + "settingName": "AutoLogon", + } + ], + "enableAutomaticUpdates": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "enableHotpatching": True, + "patchMode": "Manual", + }, + "provisionVMAgent": True, + "timeZone": "oqpoladmchkkugpxocrynztkok", + "winRM": { + "listeners": [ + {"certificateUrl": "https://microsoft.com/a", "protocol": "Http"} + ] + }, + }, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": True, + "notBeforeTimeout": "nbgfbvisxveyywfyjgcfb", + }, + "terminateNotificationProfile": { + "enable": True, + "notBeforeTimeout": "jgycfvgxpzvgsdylbcspkrxwhgxkyd", + }, + }, + "securityPostureReference": { + "excludeExtensions": ["zagiokiwvg"], + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest", + "isOverridable": True, + }, + "securityProfile": { + "encryptionAtHost": True, + "encryptionIdentity": { + "userAssignedIdentityResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + }, + "proxyAgentSettings": {"enabled": True, "keyIncarnationId": 22, "mode": "Audit"}, + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diskIOPSReadWrite": 5, + "diskMBpsReadWrite": 4, + "diskSizeGB": 11, + "lun": 14, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "nqblcowgig", + "writeAcceleratorEnabled": True, + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "communityGalleryImageId": "vlqe", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}", + "offer": "isxgumkarlkomp", + "publisher": "mqxgwbiyjzmxavhbkd", + "sharedGalleryImageId": "kmkgihoxwlawuuhcinfirktdwkmx", + "sku": "eojmppqcrnpmxirtp", + "version": "wvpcqefgtmqdgltiuz", + }, + "osDisk": { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": {"option": "Local", "placement": "CacheDisk"}, + "diskSizeGB": 21, + "image": {"uri": "https://microsoft.com/a"}, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "xhwnqpqigoymwwetvhjuuhiu", + "osType": "Windows", + "vhdContainers": ["mgyqnavpb"], + "writeAcceleratorEnabled": True, + }, + }, + "userData": "ezhyl", + }, + } + ] + }, + "capacityType": "VCpu", "computeProfile": { + "additionalVirtualMachineCapabilities": {"hibernationEnabled": True, "ultraSSDEnabled": True}, "baseVirtualMachineProfile": { "applicationProfile": { "galleryApplications": [ @@ -334,7 +625,8 @@ def main(): "computeApiVersion": "2023-07-01", "platformFaultDomainCount": 1, }, - "regularPriorityProfile": {"allocationStrategy": "LowestPrice", "capacity": 20, "minCapacity": 10}, + "mode": "Instance", + "regularPriorityProfile": {"allocationStrategy": "Prioritized", "capacity": 20, "minCapacity": 10}, "spotPriorityProfile": { "allocationStrategy": "PriceCapacityOptimized", "capacity": 20, @@ -343,15 +635,41 @@ def main(): "maxPricePerVM": 0.00865, "minCapacity": 10, }, - "vmSizesProfile": [{"name": "Standard_d1_v2", "rank": 19225}], + "vmAttributes": { + "acceleratorCount": {"max": 4, "min": 2}, + "acceleratorManufacturers": ["AMD"], + "acceleratorSupport": "Excluded", + "acceleratorTypes": ["GPU"], + "architectureTypes": ["ARM64"], + "burstableSupport": "Excluded", + "cpuManufacturers": ["Intel"], + "dataDiskCount": {"max": 4, "min": 2}, + "excludedVMSizes": ["Standard_A1"], + "localStorageDiskTypes": ["HDD"], + "localStorageInGiB": {"max": 4, "min": 2}, + "localStorageSupport": "Excluded", + "memoryInGiB": {"max": 4, "min": 2}, + "memoryInGiBPerVCpu": {"max": 4, "min": 2}, + "networkBandwidthInMbps": {"max": 4, "min": 2}, + "networkInterfaceCount": {"max": 4, "min": 2}, + "rdmaNetworkInterfaceCount": {"max": 4, "min": 2}, + "rdmaSupport": "Excluded", + "vCpuCount": {"max": 4, "min": 2}, + "vmCategories": ["GpuAccelerated"], + }, + "vmSizesProfile": [{"name": "Standard_D1_v2", "rank": 0}, {"name": "Standard_D2_v2", "rank": 1}], + "zoneAllocationPolicy": { + "distributionStrategy": "Prioritized", + "zonePreferences": [{"rank": 0, "zone": "1"}, {"rank": 1, "zone": "2"}], + }, }, - "tags": {"key3518": "luvrnuvsgdpbuofdskkcoqhfh"}, - "zones": ["zone1", "zone2"], + "tags": {}, + "zones": ["1", "2"], }, ).result() print(response) -# x-ms-original-file: 2024-11-01/Fleets_CreateOrUpdate.json +# x-ms-original-file: 2025-07-01-preview/Fleets_CreateOrUpdate.json if __name__ == "__main__": main() 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 deleted file mode 100644 index 4caaa75d683f..000000000000 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_create_or_update_minimum_set.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computefleet import ComputeFleetMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computefleet -# USAGE - python fleets_create_or_update_minimum_set.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeFleetMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.fleets.begin_create_or_update( - resource_group_name="rgazurefleet", - fleet_name="testFleet", - resource={ - "location": "eastus2euap", - "properties": { - "computeProfile": { - "baseVirtualMachineProfile": { - "networkProfile": { - "networkApiVersion": "2022-07-01", - "networkInterfaceConfigurations": [ - { - "name": "vmNameTest", - "properties": { - "enableAcceleratedNetworking": False, - "enableIPForwarding": True, - "ipConfigurations": [ - { - "name": "vmNameTest", - "properties": { - "loadBalancerBackendAddressPools": [ - { - "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" - } - ], - "primary": True, - "subnet": { - "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" - }, - }, - } - ], - "primary": True, - }, - } - ], - }, - "osProfile": { - "adminPassword": "TestPassword$0", - "adminUsername": "azureuser", - "computerNamePrefix": "prefix", - "linuxConfiguration": {"disablePasswordAuthentication": False}, - }, - "storageProfile": { - "imageReference": { - "offer": "0001-com-ubuntu-server-focal", - "publisher": "canonical", - "sku": "20_04-lts-gen2", - "version": "latest", - }, - "osDisk": { - "caching": "ReadWrite", - "createOption": "FromImage", - "managedDisk": {"storageAccountType": "Standard_LRS"}, - "osType": "Linux", - }, - }, - }, - "computeApiVersion": "2023-09-01", - "platformFaultDomainCount": 1, - }, - "regularPriorityProfile": {"allocationStrategy": "LowestPrice", "capacity": 2, "minCapacity": 1}, - "spotPriorityProfile": { - "allocationStrategy": "PriceCapacityOptimized", - "capacity": 2, - "evictionPolicy": "Delete", - "maintain": True, - "minCapacity": 1, - }, - "vmSizesProfile": [ - {"name": "Standard_D2s_v3"}, - {"name": "Standard_D4s_v3"}, - {"name": "Standard_E2s_v3"}, - ], - }, - "tags": {"key": "fleets-test"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json -if __name__ == "__main__": - main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_delete.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_delete.py index 72f38aaa8c07..daa2d8366b15 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_delete.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2024-11-01/Fleets_Delete.json +# x-ms-original-file: 2025-07-01-preview/Fleets_Delete.json if __name__ == "__main__": main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_get.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_get.py index 729d2cbddfb2..cc6d0bfdf305 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_get.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_get.py @@ -32,11 +32,11 @@ def main(): response = client.fleets.get( resource_group_name="rgazurefleet", - fleet_name="testFleet", + fleet_name="myFleet", ) print(response) -# x-ms-original-file: 2024-11-01/Fleets_Get.json +# x-ms-original-file: 2025-07-01-preview/Fleets_Get.json if __name__ == "__main__": main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_resource_group.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_resource_group.py index 35acdd0eb995..bc289f9af308 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_resource_group.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01/Fleets_ListByResourceGroup.json +# x-ms-original-file: 2025-07-01-preview/Fleets_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_subscription.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_subscription.py index d62f64b526d3..07449a833804 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_subscription.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01/Fleets_ListBySubscription.json +# x-ms-original-file: 2025-07-01-preview/Fleets_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_virtual_machine_scale_sets.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_virtual_machine_scale_sets.py index c2e600bcacae..6ce04f317d50 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_virtual_machine_scale_sets.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_virtual_machine_scale_sets.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01/Fleets_ListVirtualMachineScaleSets.json +# x-ms-original-file: 2025-07-01-preview/Fleets_ListVirtualMachineScaleSets.json if __name__ == "__main__": main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_virtual_machines.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_virtual_machines.py new file mode 100644 index 000000000000..8087fac85bf5 --- /dev/null +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/fleets_list_virtual_machines.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.computefleet import ComputeFleetMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-computefleet +# USAGE + python fleets_list_virtual_machines.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ComputeFleetMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.fleets.list_virtual_machines( + resource_group_name="rgazurefleet", + name="myFleet", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-01-preview/Fleets_ListVirtualMachines.json +if __name__ == "__main__": + main() 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 34b882bfb2dd..b9bfde6af25c 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. @@ -32,7 +33,7 @@ def main(): response = client.fleets.begin_update( resource_group_name="rgazurefleet", - fleet_name="testFleet", + fleet_name="myFleet", properties={ "identity": {"type": "UserAssigned", "userAssignedIdentities": {}}, "plan": { @@ -43,7 +44,301 @@ def main(): "version": "wa", }, "properties": { + "additionalLocationsProfile": { + "locationProfiles": [ + { + "location": "v", + "virtualMachineProfileOverride": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "zdqfcpvt", + "enableAutomaticUpgrade": True, + "order": 22, + "packageReferenceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}", + "tags": "eomzidad", + "treatFailureAsDeploymentFailure": True, + } + ] + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": {"enabled": True, "storageUri": "https://microsoft.com/a"} + }, + "extensionProfile": { + "extensions": [ + { + "name": "oredyuufsd", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "muglieujh", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://microsoft.com/a", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + }, + }, + "provisionAfterExtensions": ["xuefrutmgzsxrpjjayvy"], + "publisher": "ccbiyfuveemaaopgxbjpm", + "settings": {}, + "suppressFailures": True, + "type": "yorumzkbfpxnrdwgczwwaeaxmda", + "typeHandlerVersion": "nlnqbmgzwubbc", + }, + } + ], + "extensionsTimeBudget": "trluxrynunvdnukztblhbnsubr", + }, + "hardwareProfile": {"vmSizeProperties": {"vCPUsAvailable": 8, "vCPUsPerCore": 17}}, + "licenseType": "ginsqshzwimjteiyfxhnjxfrcaat", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "gpunpcdsdphgspvgwwbnk", + "properties": { + "auxiliaryMode": "None", + "auxiliarySku": "None", + "deleteOption": "Delete", + "disableTcpStateTracking": True, + "dnsSettings": {"dnsServers": ["sjpmlu"]}, + "enableAcceleratedNetworking": True, + "enableFpga": True, + "enableIPForwarding": True, + "ipConfigurations": [ + { + "name": "fweiphgkyhbcsbfjmxzczkpg", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + ], + "primary": True, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "dvnoamqjyshquvtmf", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "ayofnb", + "domainNameLabelScope": "TenantReuse", + }, + "idleTimeoutInMinutes": 1, + "ipTags": [ + { + "ipTagType": "zqpznczmc", + "tag": "ugnfzikniqjisffrbvryavenhmtd", + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + }, + }, + "sku": {"name": "Basic", "tier": "Regional"}, + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + }, + }, + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + }, + "primary": True, + }, + } + ], + }, + "osProfile": { + "adminPassword": "", + "adminUsername": "xdgnnqymtamdyqxy", + "allowExtensionOperations": True, + "computerNamePrefix": "tec", + "customData": "whcielwnerogvbxnbia", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "patchMode": "ImageDefault", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [ + {"keyData": "vmgnwtwjcodavmu", "path": "ebeglujkldnntlpmazrg"} + ] + }, + }, + "requireGuestProvisionSignal": True, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + }, + "vaultCertificates": [ + { + "certificateStore": "yycyfwpymjtwzza", + "certificateUrl": "https://microsoft.com/a", + } + ], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "xcigofrcurxdwx", + "passName": "OobeSystem", + "settingName": "AutoLogon", + } + ], + "enableAutomaticUpdates": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "enableHotpatching": True, + "patchMode": "Manual", + }, + "provisionVMAgent": True, + "timeZone": "ktf", + "winRM": { + "listeners": [ + {"certificateUrl": "https://microsoft.com/apzd", "protocol": "Http"} + ] + }, + }, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": True, + "notBeforeTimeout": "ednjvcedpjmczw", + }, + "terminateNotificationProfile": { + "enable": True, + "notBeforeTimeout": "plbazenobaeueixatewbey", + }, + }, + "securityPostureReference": { + "excludeExtensions": ["ragwgzswxzzz"], + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest", + "isOverridable": True, + }, + "securityProfile": { + "encryptionAtHost": True, + "encryptionIdentity": { + "userAssignedIdentityResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + }, + "proxyAgentSettings": {"enabled": True, "keyIncarnationId": 6, "mode": "Audit"}, + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diskIOPSReadWrite": 24, + "diskMBpsReadWrite": 4, + "diskSizeGB": 9, + "lun": 6, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "mhljivkyryuomrapmmxx", + "writeAcceleratorEnabled": True, + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "communityGalleryImageId": "vlqe", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}", + "offer": "isxgumkarlkomp", + "publisher": "mqxgwbiyjzmxavhbkd", + "sharedGalleryImageId": "kmkgihoxwlawuuhcinfirktdwkmx", + "sku": "eojmppqcrnpmxirtp", + "version": "wvpcqefgtmqdgltiuz", + }, + "osDisk": { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": {"option": "Local", "placement": "CacheDisk"}, + "diskSizeGB": 9, + "image": {"uri": "https://microsoft.com/a"}, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + }, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "dt", + "osType": "Windows", + "vhdContainers": ["kdagj"], + "writeAcceleratorEnabled": True, + }, + }, + "userData": "zekdr", + }, + } + ] + }, + "capacityType": "VM", "computeProfile": { + "additionalVirtualMachineCapabilities": {"hibernationEnabled": True, "ultraSSDEnabled": True}, "baseVirtualMachineProfile": { "applicationProfile": { "galleryApplications": [ @@ -333,7 +628,8 @@ def main(): "computeApiVersion": "2023-07-01", "platformFaultDomainCount": 1, }, - "regularPriorityProfile": {"allocationStrategy": "LowestPrice", "capacity": 20, "minCapacity": 10}, + "mode": "Managed", + "regularPriorityProfile": {"allocationStrategy": "Prioritized", "capacity": 20, "minCapacity": 10}, "spotPriorityProfile": { "allocationStrategy": "PriceCapacityOptimized", "capacity": 20, @@ -342,7 +638,30 @@ def main(): "maxPricePerVM": 0.00865, "minCapacity": 10, }, - "vmSizesProfile": [{"name": "Standard_d1_v2", "rank": 19225}], + "vmAttributes": { + "acceleratorCount": {"max": 4, "min": 2}, + "acceleratorManufacturers": ["AMD"], + "acceleratorSupport": "Excluded", + "acceleratorTypes": ["GPU"], + "architectureTypes": ["ARM64"], + "burstableSupport": "Excluded", + "cpuManufacturers": ["Intel"], + "dataDiskCount": {"max": 4, "min": 2}, + "excludedVMSizes": ["Standard_A1"], + "localStorageDiskTypes": ["HDD"], + "localStorageInGiB": {"max": 4, "min": 2}, + "localStorageSupport": "Excluded", + "memoryInGiB": {"max": 4, "min": 2}, + "memoryInGiBPerVCpu": {"max": 4, "min": 2}, + "networkBandwidthInMbps": {"max": 4, "min": 2}, + "networkInterfaceCount": {"max": 4, "min": 2}, + "rdmaNetworkInterfaceCount": {"max": 4, "min": 2}, + "rdmaSupport": "Excluded", + "vCpuCount": {"max": 4, "min": 2}, + "vmCategories": ["GeneralPurpose"], + }, + "vmSizesProfile": [{"name": "Standard_D1_v2", "rank": 0}, {"name": "Standard_D2_v2", "rank": 1}], + "zoneAllocationPolicy": {"distributionStrategy": "BestEffortSingleZone"}, }, "tags": {}, }, @@ -350,6 +669,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01/Fleets_Update.json +# x-ms-original-file: 2025-07-01-preview/Fleets_Update.json if __name__ == "__main__": main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/operations_list.py b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/operations_list.py index f287fdb6b057..2e7353df7683 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_samples/operations_list.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_samples/operations_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01/Operations_List.json +# x-ms-original-file: 2025-07-01-preview/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations.py b/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations.py index a467cce5565f..da4b02b32ab0 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations.py @@ -505,6 +505,8 @@ def test_fleets_begin_create_or_update(self, resource_group): } ] }, + "capacityType": "str", + "mode": "str", "provisioningState": "str", "regularPriorityProfile": {"allocationStrategy": "str", "capacity": 0, "minCapacity": 0}, "spotPriorityProfile": { @@ -539,6 +541,10 @@ def test_fleets_begin_create_or_update(self, resource_group): "rdmaSupport": "str", "vmCategories": ["str"], }, + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"zone": "str", "rank": 0}], + }, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -1027,6 +1033,8 @@ def test_fleets_begin_update(self, resource_group): } ] }, + "capacityType": "str", + "mode": "str", "provisioningState": "str", "regularPriorityProfile": {"allocationStrategy": "str", "capacity": 0, "minCapacity": 0}, "spotPriorityProfile": { @@ -1061,6 +1069,10 @@ def test_fleets_begin_update(self, resource_group): "rdmaSupport": "str", "vmCategories": ["str"], }, + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"zone": "str", "rank": 0}], + }, }, "tags": {"str": "str"}, }, @@ -1108,3 +1120,25 @@ def test_fleets_list_virtual_machine_scale_sets(self, resource_group): result = [r for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_fleets_list_virtual_machines(self, resource_group): + response = self.client.fleets.list_virtual_machines( + resource_group_name=resource_group.name, + name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_fleets_begin_cancel(self, resource_group): + response = self.client.fleets.begin_cancel( + resource_group_name=resource_group.name, + fleet_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations_async.py b/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations_async.py index c32cf8dfa392..122affb399c3 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations_async.py +++ b/sdk/computefleet/azure-mgmt-computefleet/generated_tests/test_compute_fleet_mgmt_fleets_operations_async.py @@ -526,6 +526,8 @@ async def test_fleets_begin_create_or_update(self, resource_group): } ] }, + "capacityType": "str", + "mode": "str", "provisioningState": "str", "regularPriorityProfile": {"allocationStrategy": "str", "capacity": 0, "minCapacity": 0}, "spotPriorityProfile": { @@ -560,6 +562,10 @@ async def test_fleets_begin_create_or_update(self, resource_group): "rdmaSupport": "str", "vmCategories": ["str"], }, + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"zone": "str", "rank": 0}], + }, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -1069,6 +1075,8 @@ async def test_fleets_begin_update(self, resource_group): } ] }, + "capacityType": "str", + "mode": "str", "provisioningState": "str", "regularPriorityProfile": {"allocationStrategy": "str", "capacity": 0, "minCapacity": 0}, "spotPriorityProfile": { @@ -1103,6 +1111,10 @@ async def test_fleets_begin_update(self, resource_group): "rdmaSupport": "str", "vmCategories": ["str"], }, + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"zone": "str", "rank": 0}], + }, }, "tags": {"str": "str"}, }, @@ -1153,3 +1165,27 @@ async def test_fleets_list_virtual_machine_scale_sets(self, resource_group): result = [r async for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_fleets_list_virtual_machines(self, resource_group): + response = self.client.fleets.list_virtual_machines( + resource_group_name=resource_group.name, + name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_fleets_begin_cancel(self, resource_group): + response = await ( + await self.client.fleets.begin_cancel( + resource_group_name=resource_group.name, + fleet_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/computefleet/azure-mgmt-computefleet/pyproject.toml b/sdk/computefleet/azure-mgmt-computefleet/pyproject.toml index 540da07d41af..1970b31f041e 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/pyproject.toml +++ b/sdk/computefleet/azure-mgmt-computefleet/pyproject.toml @@ -4,3 +4,16 @@ mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-computefleet" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Computefleet Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true +sample_link = "" +exclude_folders = "" +title = "ComputeFleetMgmtClient" diff --git a/sdk/computefleet/azure-mgmt-computefleet/sdk_packaging.toml b/sdk/computefleet/azure-mgmt-computefleet/sdk_packaging.toml deleted file mode 100644 index f19c21d8eb05..000000000000 --- a/sdk/computefleet/azure-mgmt-computefleet/sdk_packaging.toml +++ /dev/null @@ -1,12 +0,0 @@ -[packaging] -package_name = "azure-mgmt-computefleet" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "Computefleet Management" -package_doc_id = "" -is_stable = true -is_arm = true -need_msrestazure = false -need_azuremgmtcore = true -sample_link = "" -exclude_folders = "" -title = "ComputeFleetMgmtClient" diff --git a/sdk/computefleet/azure-mgmt-computefleet/setup.py b/sdk/computefleet/azure-mgmt-computefleet/setup.py index 4b522212283a..1e39570735f1 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/setup.py +++ b/sdk/computefleet/azure-mgmt-computefleet/setup.py @@ -49,15 +49,15 @@ url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ], zip_safe=False, @@ -77,7 +77,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.6.0", ], - python_requires=">=3.8", + python_requires=">=3.9", ) 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 e7555263c790..357b0e45a4c4 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 4740170973b8..a2c3ca01b32c 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 b87a333b58e4..d7027c0bd41f 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 921096d91c60..3e9d59e6a284 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 58d3b9419143..5b23342aa028 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: 063aae9a2ad0060accf70c1a605c2931cad19049 repo: Azure/azure-rest-api-specs additionalDirectories: