From da96d9e83ee07286411be44724839c2c3c4e71c6 Mon Sep 17 00:00:00 2001 From: william Date: Thu, 13 Aug 2026 09:45:53 +0800 Subject: [PATCH 1/4] Generate aaz code for vm & vmss operation, 2026-04-01 --- .../vm/aaz/latest/vm/_create.py | 320 +++++++++++++++- .../command_modules/vm/aaz/latest/vm/_show.py | 127 ++++++- .../vm/aaz/latest/vm/_update.py | 348 +++++++++++++++++- .../command_modules/vm/aaz/latest/vm/_wait.py | 125 ++++++- .../vm/aaz/latest/vmss/_create.py | 283 +++++++++++++- .../vm/aaz/latest/vmss/_show.py | 100 ++++- .../vm/aaz/latest/vmss/_update.py | 313 +++++++++++++++- .../vm/aaz/latest/vmss/_wait.py | 98 ++++- 8 files changed, 1674 insertions(+), 40 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_create.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_create.py index 3e3e5ade1b9..8281cf51aba 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_create.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_create.py @@ -16,9 +16,9 @@ class Create(AAZCommand): """ _aaz_info = { - "version": "2025-11-01", + "version": "2026-04-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2026-04-01"], ] } @@ -230,6 +230,11 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01.", ) cls._build_args_sub_resource_create(_args_schema.host_group) + _args_schema.interconnect_block_profile = AAZObjectArg( + options=["--interconnect-block-profile"], + arg_group="Properties", + help="Specifies information about the Interconnect Block that is used to allocate the Virtual Machine. Minimum api-version: 2026-03-01.", + ) _args_schema.license_type = AAZStrArg( options=["--license-type"], arg_group="Properties", @@ -254,7 +259,7 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--priority"], arg_group="Properties", help="Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01", - enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot"}, + enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot", "SpotPlus": "SpotPlus"}, ) _args_schema.proximity_placement_group = AAZObjectArg( options=["--proximity-placement-group"], @@ -361,6 +366,10 @@ def _build_arguments_schema(cls, *args, **kwargs): help="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 for more details.", ) cls._build_args_sub_resource_create(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolArg( + options=["disable-capacity-reservation-assignment"], + help="Specifies whether the virtual machine is explicitly opted out from being associated with any capacity reservation. When set to true, the virtual machine will not be allowed to implicitly or explicitly associate with any type of capacity reservation and will consume capacity from the publicly available capacity. Minimum api-version: 2026-04-01.", + ) diagnostics_profile = cls._args_schema.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectArg( @@ -379,6 +388,11 @@ def _build_arguments_schema(cls, *args, **kwargs): ) hardware_profile = cls._args_schema.hardware_profile + hardware_profile.processor_mode = AAZStrArg( + options=["processor-mode"], + help="Specifies the processor mode for the virtual machine or virtual machine scale set. Optional; if omitted, the platform default applies (currently Deterministic). This property can be updated on a running VM or VMSS without deallocation or reboot. Minimum api-version: 2026-04-01.", + enum={"Deterministic": "Deterministic", "Opportunistic": "Opportunistic"}, + ) hardware_profile.vm_size = AAZStrArg( options=["vm-size"], help="Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.", @@ -399,7 +413,18 @@ def _build_arguments_schema(cls, *args, **kwargs): help="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](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**", ) + interconnect_block_profile = cls._args_schema.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectArg( + options=["interconnect-block"], + help="Specifies the Interconnect Block resource ID that should be used for allocating the Virtual Machine or Scale Set VM instances provided enough capacity has been reserved.", + ) + cls._build_args_api_entity_reference_create(interconnect_block_profile.interconnect_block) + network_profile = cls._args_schema.network_profile + network_profile.interconnect_group_profile = AAZObjectArg( + options=["interconnect-group-profile"], + help="Specifies the interconnect group profile to associate with the virtual machine. Minimum api-version: 2026-03-01.", + ) network_profile.network_api_version = AAZStrArg( options=["network-api-version"], help="specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations", @@ -414,6 +439,21 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Specifies the list of resource Ids for the network interfaces associated with the virtual machine.", ) + interconnect_group_profile = cls._args_schema.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectArg( + options=["interconnect-group"], + help="Reference to the interconnect group resource.", + ) + cls._build_args_sub_resource_create(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListArg( + options=["subgroups"], + help="The list of subgroup references within the interconnect group.", + ) + + subgroups = cls._args_schema.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectArg() + cls._build_args_sub_resource_create(subgroups.Element) + network_interface_configurations = cls._args_schema.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectArg() @@ -604,6 +644,10 @@ def _build_arguments_schema(cls, *args, **kwargs): ip_tags.Element = AAZObjectArg() _element = cls._args_schema.network_profile.network_interface_configurations.Element.ip_configurations.Element.public_ip_address_configuration.ip_tags.Element + _element.first_party_service_tag_id = AAZResourceIdArg( + options=["first-party-service-tag-id"], + help="The first party service tag resource identifier associated with the public IP address.", + ) _element.ip_tag_type = AAZStrArg( options=["ip-tag-type"], help="IP tag type. Example: FirstPartyUsage.", @@ -1057,6 +1101,11 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["data-disks"], help="Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).", ) + storage_profile.disk_api_version = AAZStrArg( + options=["disk-api-version"], + help="Specifies the Disk API version used when applying additionalDiskProperties to managed disks. The value must be in the format YYYY-MM-DD (e.g., \"2026-03-02\").", + enum={"2025-01-02": "2025-01-02", "2026-03-02": "2026-03-02"}, + ) storage_profile.disk_controller_type = AAZStrArg( options=["disk-controller-type"], help="Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.", @@ -1306,6 +1355,24 @@ def _build_arguments_schema(cls, *args, **kwargs): cls._build_args_sub_resource_create(key_encryption_key.source_vault) return cls._args_schema + _args_api_entity_reference_create = None + + @classmethod + def _build_args_api_entity_reference_create(cls, _schema): + if cls._args_api_entity_reference_create is not None: + _schema.id = cls._args_api_entity_reference_create.id + return + + cls._args_api_entity_reference_create = AAZObjectArg() + + api_entity_reference_create = cls._args_api_entity_reference_create + api_entity_reference_create.id = AAZStrArg( + options=["id"], + help="The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...", + ) + + _schema.id = cls._args_api_entity_reference_create.id + _args_disk_encryption_set_parameters_create = None @classmethod @@ -1331,6 +1398,7 @@ def _build_args_host_endpoint_settings_create(cls, _schema): if cls._args_host_endpoint_settings_create is not None: _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_create.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_create.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_create.use_local_file_rules return cls._args_host_endpoint_settings_create = AAZObjectArg() @@ -1345,15 +1413,21 @@ def _build_args_host_endpoint_settings_create(cls, _schema): help="Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.", enum={"Audit": "Audit", "Disabled": "Disabled", "Enforce": "Enforce"}, ) + host_endpoint_settings_create.use_local_file_rules = AAZBoolArg( + options=["use-local-file-rules"], + help="When set to true, instructs the GuestProxyAgent inside the VM to load additional access control rules defined in a local file on the VM.", + ) _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_create.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_create.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_create.use_local_file_rules _args_managed_disk_parameters_create = None @classmethod def _build_args_managed_disk_parameters_create(cls, _schema): if cls._args_managed_disk_parameters_create is not None: + _schema.additional_disk_properties = cls._args_managed_disk_parameters_create.additional_disk_properties _schema.disk_encryption_set = cls._args_managed_disk_parameters_create.disk_encryption_set _schema.id = cls._args_managed_disk_parameters_create.id _schema.security_profile = cls._args_managed_disk_parameters_create.security_profile @@ -1363,6 +1437,10 @@ def _build_args_managed_disk_parameters_create(cls, _schema): cls._args_managed_disk_parameters_create = AAZObjectArg() managed_disk_parameters_create = cls._args_managed_disk_parameters_create + managed_disk_parameters_create.additional_disk_properties = AAZObjectArg( + options=["additional-disk-properties"], + help="Specifies additional properties for the managed disk that can be set at the time of implicit creation of the disk. This property is not captured for Restore Points.", + ) managed_disk_parameters_create.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], help="Specifies the customer managed disk encryption set resource id for the managed disk.", @@ -1382,6 +1460,69 @@ def _build_args_managed_disk_parameters_create(cls, _schema): enum={"PremiumV2_LRS": "PremiumV2_LRS", "Premium_LRS": "Premium_LRS", "Premium_ZRS": "Premium_ZRS", "StandardSSD_LRS": "StandardSSD_LRS", "StandardSSD_ZRS": "StandardSSD_ZRS", "Standard_LRS": "Standard_LRS", "UltraSSD_LRS": "UltraSSD_LRS"}, ) + additional_disk_properties = cls._args_managed_disk_parameters_create.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectArg( + options=["managed-disk-properties"], + help="Specifies the managed disk properties that can be set at the time of implicit creation of the disk.", + ) + + managed_disk_properties = cls._args_managed_disk_parameters_create.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectArg( + options=["availability-policy"], + help="In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.", + ) + managed_disk_properties.bursting_enabled = AAZBoolArg( + options=["bursting-enabled"], + help="Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.", + ) + managed_disk_properties.disk_access_id = AAZStrArg( + options=["disk-access-id"], + help="Azure resource Id of the DiskAccess resource for using private endpoints on disks.", + ) + managed_disk_properties.disk_iops_read_only = AAZIntArg( + options=["disk-iops-read-only"], + help="The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntArg( + options=["disk-m-bps-read-only"], + help="The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.", + ) + managed_disk_properties.logical_sector_size = AAZIntArg( + options=["logical-sector-size"], + help="Logical sector size in bytes for Ultra Disks. Supported values are 512 and 4096. 4096 is the default.", + ) + managed_disk_properties.max_shares = AAZIntArg( + options=["max-shares"], + help="The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. Applies to data disks only.", + fmt=AAZIntArgFormat( + minimum=1, + ), + ) + managed_disk_properties.network_access_policy = AAZStrArg( + options=["network-access-policy"], + help="Policy for accessing the disk via network.", + enum={"AllowAll": "AllowAll", "AllowPrivate": "AllowPrivate", "DenyAll": "DenyAll"}, + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolArg( + options=["optimized-for-frequent-attach"], + help="Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.", + ) + managed_disk_properties.performance_plus = AAZBoolArg( + options=["performance-plus"], + help="Set this flag to true to get a boost on the performance target of the disk deployed. This flag can only be set on disk creation time and cannot be disabled after enabled.", + ) + managed_disk_properties.tier = AAZStrArg( + options=["tier"], + help="Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.", + ) + + availability_policy = cls._args_managed_disk_parameters_create.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrArg( + options=["action-on-disk-delay"], + help="Determines how to handle disks with slow I/O.", + enum={"AutomaticReattach": "AutomaticReattach", "None": "None"}, + ) + security_profile = cls._args_managed_disk_parameters_create.security_profile security_profile.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], @@ -1394,6 +1535,7 @@ def _build_args_managed_disk_parameters_create(cls, _schema): enum={"DiskWithVMGuestState": "DiskWithVMGuestState", "NonPersistedTPM": "NonPersistedTPM", "VMGuestStateOnly": "VMGuestStateOnly"}, ) + _schema.additional_disk_properties = cls._args_managed_disk_parameters_create.additional_disk_properties _schema.disk_encryption_set = cls._args_managed_disk_parameters_create.disk_encryption_set _schema.id = cls._args_managed_disk_parameters_create.id _schema.security_profile = cls._args_managed_disk_parameters_create.security_profile @@ -1516,7 +1658,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -1604,6 +1746,7 @@ def content(self): properties.set_prop("hardwareProfile", AAZObjectType, ".hardware_profile") _CreateHelper._build_schema_sub_resource_create(properties.set_prop("host", AAZObjectType, ".host")) _CreateHelper._build_schema_sub_resource_create(properties.set_prop("hostGroup", AAZObjectType, ".host_group")) + properties.set_prop("interconnectBlockProfile", AAZObjectType, ".interconnect_block_profile") properties.set_prop("licenseType", AAZStrType, ".license_type") properties.set_prop("networkProfile", AAZObjectType, ".network_profile") properties.set_prop("osProfile", AAZObjectType, ".os_profile") @@ -1648,6 +1791,7 @@ def content(self): capacity_reservation = _builder.get(".properties.capacityReservation") if capacity_reservation is not None: _CreateHelper._build_schema_sub_resource_create(capacity_reservation.set_prop("capacityReservationGroup", AAZObjectType, ".capacity_reservation_group")) + capacity_reservation.set_prop("disableCapacityReservationAssignment", AAZBoolType, ".disable_capacity_reservation_assignment") diagnostics_profile = _builder.get(".properties.diagnosticsProfile") if diagnostics_profile is not None: @@ -1660,6 +1804,7 @@ def content(self): hardware_profile = _builder.get(".properties.hardwareProfile") if hardware_profile is not None: + hardware_profile.set_prop("processorMode", AAZStrType, ".processor_mode") hardware_profile.set_prop("vmSize", AAZStrType, ".vm_size") hardware_profile.set_prop("vmSizeProperties", AAZObjectType, ".vm_size_properties") @@ -1668,12 +1813,26 @@ def content(self): vm_size_properties.set_prop("vCPUsAvailable", AAZIntType, ".v_cp_us_available") vm_size_properties.set_prop("vCPUsPerCore", AAZIntType, ".v_cp_us_per_core") + interconnect_block_profile = _builder.get(".properties.interconnectBlockProfile") + if interconnect_block_profile is not None: + _CreateHelper._build_schema_api_entity_reference_create(interconnect_block_profile.set_prop("interconnectBlock", AAZObjectType, ".interconnect_block")) + network_profile = _builder.get(".properties.networkProfile") if network_profile is not None: + network_profile.set_prop("interconnectGroupProfile", AAZObjectType, ".interconnect_group_profile") network_profile.set_prop("networkApiVersion", AAZStrType, ".network_api_version") network_profile.set_prop("networkInterfaceConfigurations", AAZListType, ".network_interface_configurations") network_profile.set_prop("networkInterfaces", AAZListType, ".network_interfaces") + interconnect_group_profile = _builder.get(".properties.networkProfile.interconnectGroupProfile") + if interconnect_group_profile is not None: + _CreateHelper._build_schema_sub_resource_create(interconnect_group_profile.set_prop("interconnectGroup", AAZObjectType, ".interconnect_group")) + interconnect_group_profile.set_prop("subgroups", AAZListType, ".subgroups") + + subgroups = _builder.get(".properties.networkProfile.interconnectGroupProfile.subgroups") + if subgroups is not None: + _CreateHelper._build_schema_sub_resource_create(subgroups.set_elements(AAZObjectType, ".")) + network_interface_configurations = _builder.get(".properties.networkProfile.networkInterfaceConfigurations") if network_interface_configurations is not None: network_interface_configurations.set_elements(AAZObjectType, ".") @@ -1766,6 +1925,7 @@ def content(self): _elements = _builder.get(".properties.networkProfile.networkInterfaceConfigurations[].properties.ipConfigurations[].properties.publicIPAddressConfiguration.properties.ipTags[]") if _elements is not None: + _elements.set_prop("firstPartyServiceTagId", AAZStrType, ".first_party_service_tag_id") _elements.set_prop("ipTagType", AAZStrType, ".ip_tag_type") _elements.set_prop("tag", AAZStrType, ".tag") @@ -1984,6 +2144,7 @@ def content(self): if storage_profile is not None: storage_profile.set_prop("alignRegionalDisksToVMZone", AAZBoolType, ".align_regional_disks_to_vm_zone") storage_profile.set_prop("dataDisks", AAZListType, ".data_disks") + storage_profile.set_prop("diskApiVersion", AAZStrType, ".disk_api_version") storage_profile.set_prop("diskControllerType", AAZStrType, ".disk_controller_type") storage_profile.set_prop("imageReference", AAZObjectType, ".image_reference") storage_profile.set_prop("osDisk", AAZObjectType, ".os_disk") @@ -2225,6 +2386,9 @@ def _build_schema_on_200_201(cls): serialized_name="instanceView", flags={"read_only": True}, ) + properties.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) properties.license_type = AAZStrType( serialized_name="licenseType", ) @@ -2323,6 +2487,9 @@ def _build_schema_on_200_201(cls): serialized_name="capacityReservationGroup", ) _CreateHelper._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = cls._schema_on_200_201.properties.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -2336,6 +2503,9 @@ def _build_schema_on_200_201(cls): ) hardware_profile = cls._schema_on_200_201.properties.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size = AAZStrType( serialized_name="vmSize", ) @@ -2359,6 +2529,10 @@ def _build_schema_on_200_201(cls): instance_view.boot_diagnostics = AAZObjectType( serialized_name="bootDiagnostics", ) + instance_view.capacity_reservation_type = AAZStrType( + serialized_name="capacityReservationType", + flags={"read_only": True}, + ) instance_view.computer_name = AAZStrType( serialized_name="computerName", ) @@ -2367,6 +2541,10 @@ def _build_schema_on_200_201(cls): instance_view.hyper_v_generation = AAZStrType( serialized_name="hyperVGeneration", ) + instance_view.interconnect_instance_view = AAZObjectType( + serialized_name="interconnectInstanceView", + flags={"read_only": True}, + ) instance_view.is_vm_in_standby_pool = AAZBoolType( serialized_name="isVMInStandbyPool", flags={"read_only": True}, @@ -2440,6 +2618,12 @@ def _build_schema_on_200_201(cls): extensions.Element = AAZObjectType() _CreateHelper._build_schema_virtual_machine_extension_instance_view_read(extensions.Element) + interconnect_instance_view = cls._schema_on_200_201.properties.instance_view.interconnect_instance_view + interconnect_instance_view.interconnect_subgroup_id = AAZStrType( + serialized_name="interconnectSubgroupId", + flags={"read_only": True}, + ) + maintenance_redeploy_status = cls._schema_on_200_201.properties.instance_view.maintenance_redeploy_status maintenance_redeploy_status.is_customer_initiated_maintenance_allowed = AAZBoolType( serialized_name="isCustomerInitiatedMaintenanceAllowed", @@ -2591,7 +2775,16 @@ def _build_schema_on_200_201(cls): ) _CreateHelper._build_schema_instance_view_status_read(vm_health.status) + interconnect_block_profile = cls._schema_on_200_201.properties.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + _CreateHelper._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = cls._schema_on_200_201.properties.network_profile + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -2602,6 +2795,17 @@ def _build_schema_on_200_201(cls): serialized_name="networkInterfaces", ) + interconnect_group_profile = cls._schema_on_200_201.properties.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + _CreateHelper._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = cls._schema_on_200_201.properties.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + _CreateHelper._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = cls._schema_on_200_201.properties.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -2751,6 +2955,9 @@ def _build_schema_on_200_201(cls): ip_tags.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -3076,6 +3283,9 @@ def _build_schema_on_200_201(cls): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) @@ -3123,6 +3333,7 @@ def _build_schema_on_200_201(cls): _element.source_resource = AAZObjectType( serialized_name="sourceResource", ) + _CreateHelper._build_schema_api_entity_reference_read(_element.source_resource) _element.storage_fault_domain_alignment = AAZStrType( serialized_name="storageFaultDomainAlignment", ) @@ -3135,9 +3346,6 @@ def _build_schema_on_200_201(cls): serialized_name="writeAcceleratorEnabled", ) - source_resource = cls._schema_on_200_201.properties.storage_profile.data_disks.Element.source_resource - source_resource.id = AAZStrType() - image_reference = cls._schema_on_200_201.properties.storage_profile.image_reference image_reference.community_gallery_image_id = AAZStrType( serialized_name="communityGalleryImageId", @@ -3282,6 +3490,12 @@ def _build_schema_on_200_201(cls): class _CreateHelper: """Helper class for Create""" + @classmethod + def _build_schema_api_entity_reference_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("id", AAZStrType, ".id") + @classmethod def _build_schema_disk_encryption_set_parameters_create(cls, _builder): if _builder is None: @@ -3294,16 +3508,40 @@ def _build_schema_host_endpoint_settings_create(cls, _builder): return _builder.set_prop("inVMAccessControlProfileReferenceId", AAZStrType, ".in_vm_access_control_profile_reference_id") _builder.set_prop("mode", AAZStrType, ".mode") + _builder.set_prop("useLocalFileRules", AAZBoolType, ".use_local_file_rules") @classmethod def _build_schema_managed_disk_parameters_create(cls, _builder): if _builder is None: return + _builder.set_prop("additionalDiskProperties", AAZObjectType, ".additional_disk_properties") cls._build_schema_disk_encryption_set_parameters_create(_builder.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) _builder.set_prop("id", AAZStrType, ".id") _builder.set_prop("securityProfile", AAZObjectType, ".security_profile") _builder.set_prop("storageAccountType", AAZStrType, ".storage_account_type") + additional_disk_properties = _builder.get(".additionalDiskProperties") + if additional_disk_properties is not None: + additional_disk_properties.set_prop("managedDiskProperties", AAZObjectType, ".managed_disk_properties") + + managed_disk_properties = _builder.get(".additionalDiskProperties.managedDiskProperties") + if managed_disk_properties is not None: + managed_disk_properties.set_prop("availabilityPolicy", AAZObjectType, ".availability_policy") + managed_disk_properties.set_prop("burstingEnabled", AAZBoolType, ".bursting_enabled") + managed_disk_properties.set_prop("diskAccessId", AAZStrType, ".disk_access_id") + managed_disk_properties.set_prop("diskIOPSReadOnly", AAZIntType, ".disk_iops_read_only") + managed_disk_properties.set_prop("diskMBpsReadOnly", AAZIntType, ".disk_m_bps_read_only") + managed_disk_properties.set_prop("logicalSectorSize", AAZIntType, ".logical_sector_size") + managed_disk_properties.set_prop("maxShares", AAZIntType, ".max_shares") + managed_disk_properties.set_prop("networkAccessPolicy", AAZStrType, ".network_access_policy") + managed_disk_properties.set_prop("optimizedForFrequentAttach", AAZBoolType, ".optimized_for_frequent_attach") + managed_disk_properties.set_prop("performancePlus", AAZBoolType, ".performance_plus") + managed_disk_properties.set_prop("tier", AAZStrType, ".tier") + + availability_policy = _builder.get(".additionalDiskProperties.managedDiskProperties.availabilityPolicy") + if availability_policy is not None: + availability_policy.set_prop("actionOnDiskDelay", AAZStrType, ".action_on_disk_delay") + security_profile = _builder.get(".securityProfile") if security_profile is not None: cls._build_schema_disk_encryption_set_parameters_create(security_profile.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) @@ -3321,6 +3559,21 @@ def _build_schema_virtual_hard_disk_create(cls, _builder): return _builder.set_prop("uri", AAZStrType, ".uri") + _schema_api_entity_reference_read = None + + @classmethod + def _build_schema_api_entity_reference_read(cls, _schema): + if cls._schema_api_entity_reference_read is not None: + _schema.id = cls._schema_api_entity_reference_read.id + return + + cls._schema_api_entity_reference_read = _schema_api_entity_reference_read = AAZObjectType() + + api_entity_reference_read = _schema_api_entity_reference_read + api_entity_reference_read.id = AAZStrType() + + _schema.id = cls._schema_api_entity_reference_read.id + _schema_api_error_read = None @classmethod @@ -3421,6 +3674,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -3430,9 +3684,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_instance_view_status_read = None @@ -3493,6 +3751,7 @@ def _build_schema_key_vault_secret_reference_read(cls, _schema): @classmethod def _build_schema_managed_disk_parameters_read(cls, _schema): if cls._schema_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile @@ -3502,6 +3761,9 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): cls._schema_managed_disk_parameters_read = _schema_managed_disk_parameters_read = AAZObjectType() managed_disk_parameters_read = _schema_managed_disk_parameters_read + managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -3514,6 +3776,49 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="storageAccountType", ) + additional_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -3523,6 +3828,7 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_show.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_show.py index 6f8c0fada49..4cdf4196be0 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_show.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_show.py @@ -16,9 +16,9 @@ class Show(AAZCommand): """ _aaz_info = { - "version": "2025-11-01", + "version": "2026-04-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2026-04-01"], ] } @@ -122,7 +122,7 @@ def query_parameters(self): "$expand", self.ctx.args.expand, ), **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -289,6 +289,9 @@ def _build_schema_on_200(cls): serialized_name="instanceView", flags={"read_only": True}, ) + properties.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) properties.license_type = AAZStrType( serialized_name="licenseType", ) @@ -387,6 +390,9 @@ def _build_schema_on_200(cls): serialized_name="capacityReservationGroup", ) _ShowHelper._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = cls._schema_on_200.properties.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -400,6 +406,9 @@ def _build_schema_on_200(cls): ) hardware_profile = cls._schema_on_200.properties.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size = AAZStrType( serialized_name="vmSize", ) @@ -423,6 +432,10 @@ def _build_schema_on_200(cls): instance_view.boot_diagnostics = AAZObjectType( serialized_name="bootDiagnostics", ) + instance_view.capacity_reservation_type = AAZStrType( + serialized_name="capacityReservationType", + flags={"read_only": True}, + ) instance_view.computer_name = AAZStrType( serialized_name="computerName", ) @@ -431,6 +444,10 @@ def _build_schema_on_200(cls): instance_view.hyper_v_generation = AAZStrType( serialized_name="hyperVGeneration", ) + instance_view.interconnect_instance_view = AAZObjectType( + serialized_name="interconnectInstanceView", + flags={"read_only": True}, + ) instance_view.is_vm_in_standby_pool = AAZBoolType( serialized_name="isVMInStandbyPool", flags={"read_only": True}, @@ -504,6 +521,12 @@ def _build_schema_on_200(cls): extensions.Element = AAZObjectType() _ShowHelper._build_schema_virtual_machine_extension_instance_view_read(extensions.Element) + interconnect_instance_view = cls._schema_on_200.properties.instance_view.interconnect_instance_view + interconnect_instance_view.interconnect_subgroup_id = AAZStrType( + serialized_name="interconnectSubgroupId", + flags={"read_only": True}, + ) + maintenance_redeploy_status = cls._schema_on_200.properties.instance_view.maintenance_redeploy_status maintenance_redeploy_status.is_customer_initiated_maintenance_allowed = AAZBoolType( serialized_name="isCustomerInitiatedMaintenanceAllowed", @@ -655,7 +678,16 @@ def _build_schema_on_200(cls): ) _ShowHelper._build_schema_instance_view_status_read(vm_health.status) + interconnect_block_profile = cls._schema_on_200.properties.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + _ShowHelper._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = cls._schema_on_200.properties.network_profile + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -666,6 +698,17 @@ def _build_schema_on_200(cls): serialized_name="networkInterfaces", ) + interconnect_group_profile = cls._schema_on_200.properties.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + _ShowHelper._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = cls._schema_on_200.properties.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + _ShowHelper._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = cls._schema_on_200.properties.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -815,6 +858,9 @@ def _build_schema_on_200(cls): ip_tags.Element = AAZObjectType() _element = cls._schema_on_200.properties.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -1140,6 +1186,9 @@ def _build_schema_on_200(cls): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) @@ -1187,6 +1236,7 @@ def _build_schema_on_200(cls): _element.source_resource = AAZObjectType( serialized_name="sourceResource", ) + _ShowHelper._build_schema_api_entity_reference_read(_element.source_resource) _element.storage_fault_domain_alignment = AAZStrType( serialized_name="storageFaultDomainAlignment", ) @@ -1199,9 +1249,6 @@ def _build_schema_on_200(cls): serialized_name="writeAcceleratorEnabled", ) - source_resource = cls._schema_on_200.properties.storage_profile.data_disks.Element.source_resource - source_resource.id = AAZStrType() - image_reference = cls._schema_on_200.properties.storage_profile.image_reference image_reference.community_gallery_image_id = AAZStrType( serialized_name="communityGalleryImageId", @@ -1346,6 +1393,21 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" + _schema_api_entity_reference_read = None + + @classmethod + def _build_schema_api_entity_reference_read(cls, _schema): + if cls._schema_api_entity_reference_read is not None: + _schema.id = cls._schema_api_entity_reference_read.id + return + + cls._schema_api_entity_reference_read = _schema_api_entity_reference_read = AAZObjectType() + + api_entity_reference_read = _schema_api_entity_reference_read + api_entity_reference_read.id = AAZStrType() + + _schema.id = cls._schema_api_entity_reference_read.id + _schema_api_error_read = None @classmethod @@ -1446,6 +1508,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -1455,9 +1518,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_instance_view_status_read = None @@ -1518,6 +1585,7 @@ def _build_schema_key_vault_secret_reference_read(cls, _schema): @classmethod def _build_schema_managed_disk_parameters_read(cls, _schema): if cls._schema_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile @@ -1527,6 +1595,9 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): cls._schema_managed_disk_parameters_read = _schema_managed_disk_parameters_read = AAZObjectType() managed_disk_parameters_read = _schema_managed_disk_parameters_read + managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -1539,6 +1610,49 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="storageAccountType", ) + additional_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -1548,6 +1662,7 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_update.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_update.py index 8a48ef4bc16..9ca395eb02d 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_update.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_update.py @@ -18,9 +18,9 @@ class Update(AAZCommand): """ _aaz_info = { - "version": "2025-11-01", + "version": "2026-04-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2026-04-01"], ] } @@ -240,6 +240,12 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01.", ) cls._build_args_sub_resource_update(_args_schema.host_group) + _args_schema.interconnect_block_profile = AAZObjectArg( + options=["--interconnect-block-profile"], + arg_group="Properties", + help="Specifies information about the Interconnect Block that is used to allocate the Virtual Machine. Minimum api-version: 2026-03-01.", + nullable=True, + ) _args_schema.license_type = AAZStrArg( options=["--license-type"], arg_group="Properties", @@ -269,7 +275,7 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01", nullable=True, - enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot"}, + enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot", "SpotPlus": "SpotPlus"}, ) _args_schema.proximity_placement_group = AAZObjectArg( options=["--proximity-placement-group"], @@ -393,6 +399,11 @@ def _build_arguments_schema(cls, *args, **kwargs): help="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 for more details.", ) cls._build_args_sub_resource_update(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolArg( + options=["disable-capacity-reservation-assignment"], + help="Specifies whether the virtual machine is explicitly opted out from being associated with any capacity reservation. When set to true, the virtual machine will not be allowed to implicitly or explicitly associate with any type of capacity reservation and will consume capacity from the publicly available capacity. Minimum api-version: 2026-04-01.", + nullable=True, + ) diagnostics_profile = cls._args_schema.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectArg( @@ -414,6 +425,12 @@ def _build_arguments_schema(cls, *args, **kwargs): ) hardware_profile = cls._args_schema.hardware_profile + hardware_profile.processor_mode = AAZStrArg( + options=["processor-mode"], + help="Specifies the processor mode for the virtual machine or virtual machine scale set. Optional; if omitted, the platform default applies (currently Deterministic). This property can be updated on a running VM or VMSS without deallocation or reboot. Minimum api-version: 2026-04-01.", + nullable=True, + enum={"Deterministic": "Deterministic", "Opportunistic": "Opportunistic"}, + ) hardware_profile.vm_size = AAZStrArg( options=["vm-size"], help="Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.", @@ -438,7 +455,20 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) + interconnect_block_profile = cls._args_schema.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectArg( + options=["interconnect-block"], + help="Specifies the Interconnect Block resource ID that should be used for allocating the Virtual Machine or Scale Set VM instances provided enough capacity has been reserved.", + nullable=True, + ) + cls._build_args_api_entity_reference_update(interconnect_block_profile.interconnect_block) + network_profile = cls._args_schema.network_profile + network_profile.interconnect_group_profile = AAZObjectArg( + options=["interconnect-group-profile"], + help="Specifies the interconnect group profile to associate with the virtual machine. Minimum api-version: 2026-03-01.", + nullable=True, + ) network_profile.network_api_version = AAZStrArg( options=["network-api-version"], help="specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations", @@ -456,6 +486,22 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) + interconnect_group_profile = cls._args_schema.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectArg( + options=["interconnect-group"], + help="Reference to the interconnect group resource.", + ) + cls._build_args_sub_resource_update(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListArg( + options=["subgroups"], + help="The list of subgroup references within the interconnect group.", + nullable=True, + ) + + subgroups = cls._args_schema.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectArg() + cls._build_args_sub_resource_update(subgroups.Element) + network_interface_configurations = cls._args_schema.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectArg( nullable=True, @@ -676,6 +722,11 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _element = cls._args_schema.network_profile.network_interface_configurations.Element.ip_configurations.Element.public_ip_address_configuration.ip_tags.Element + _element.first_party_service_tag_id = AAZResourceIdArg( + options=["first-party-service-tag-id"], + help="The first party service tag resource identifier associated with the public IP address.", + nullable=True, + ) _element.ip_tag_type = AAZStrArg( options=["ip-tag-type"], help="IP tag type. Example: FirstPartyUsage.", @@ -1230,6 +1281,12 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).", nullable=True, ) + storage_profile.disk_api_version = AAZStrArg( + options=["disk-api-version"], + help="Specifies the Disk API version used when applying additionalDiskProperties to managed disks. The value must be in the format YYYY-MM-DD (e.g., \"2026-03-02\").", + nullable=True, + enum={"2025-01-02": "2025-01-02", "2026-03-02": "2026-03-02"}, + ) storage_profile.disk_controller_type = AAZStrArg( options=["disk-controller-type"], help="Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.", @@ -1517,6 +1574,27 @@ def _build_arguments_schema(cls, *args, **kwargs): cls._build_args_sub_resource_update(key_encryption_key.source_vault) return cls._args_schema + _args_api_entity_reference_update = None + + @classmethod + def _build_args_api_entity_reference_update(cls, _schema): + if cls._args_api_entity_reference_update is not None: + _schema.id = cls._args_api_entity_reference_update.id + return + + cls._args_api_entity_reference_update = AAZObjectArg( + nullable=True, + ) + + api_entity_reference_update = cls._args_api_entity_reference_update + api_entity_reference_update.id = AAZStrArg( + options=["id"], + help="The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...", + nullable=True, + ) + + _schema.id = cls._args_api_entity_reference_update.id + _args_disk_encryption_set_parameters_update = None @classmethod @@ -1545,6 +1623,7 @@ def _build_args_host_endpoint_settings_update(cls, _schema): if cls._args_host_endpoint_settings_update is not None: _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_update.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_update.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_update.use_local_file_rules return cls._args_host_endpoint_settings_update = AAZObjectArg( @@ -1563,15 +1642,22 @@ def _build_args_host_endpoint_settings_update(cls, _schema): nullable=True, enum={"Audit": "Audit", "Disabled": "Disabled", "Enforce": "Enforce"}, ) + host_endpoint_settings_update.use_local_file_rules = AAZBoolArg( + options=["use-local-file-rules"], + help="When set to true, instructs the GuestProxyAgent inside the VM to load additional access control rules defined in a local file on the VM.", + nullable=True, + ) _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_update.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_update.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_update.use_local_file_rules _args_managed_disk_parameters_update = None @classmethod def _build_args_managed_disk_parameters_update(cls, _schema): if cls._args_managed_disk_parameters_update is not None: + _schema.additional_disk_properties = cls._args_managed_disk_parameters_update.additional_disk_properties _schema.disk_encryption_set = cls._args_managed_disk_parameters_update.disk_encryption_set _schema.id = cls._args_managed_disk_parameters_update.id _schema.security_profile = cls._args_managed_disk_parameters_update.security_profile @@ -1583,6 +1669,11 @@ def _build_args_managed_disk_parameters_update(cls, _schema): ) managed_disk_parameters_update = cls._args_managed_disk_parameters_update + managed_disk_parameters_update.additional_disk_properties = AAZObjectArg( + options=["additional-disk-properties"], + help="Specifies additional properties for the managed disk that can be set at the time of implicit creation of the disk. This property is not captured for Restore Points.", + nullable=True, + ) managed_disk_parameters_update.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], help="Specifies the customer managed disk encryption set resource id for the managed disk.", @@ -1606,6 +1697,82 @@ def _build_args_managed_disk_parameters_update(cls, _schema): enum={"PremiumV2_LRS": "PremiumV2_LRS", "Premium_LRS": "Premium_LRS", "Premium_ZRS": "Premium_ZRS", "StandardSSD_LRS": "StandardSSD_LRS", "StandardSSD_ZRS": "StandardSSD_ZRS", "Standard_LRS": "Standard_LRS", "UltraSSD_LRS": "UltraSSD_LRS"}, ) + additional_disk_properties = cls._args_managed_disk_parameters_update.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectArg( + options=["managed-disk-properties"], + help="Specifies the managed disk properties that can be set at the time of implicit creation of the disk.", + nullable=True, + ) + + managed_disk_properties = cls._args_managed_disk_parameters_update.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectArg( + options=["availability-policy"], + help="In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.", + nullable=True, + ) + managed_disk_properties.bursting_enabled = AAZBoolArg( + options=["bursting-enabled"], + help="Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.", + nullable=True, + ) + managed_disk_properties.disk_access_id = AAZStrArg( + options=["disk-access-id"], + help="Azure resource Id of the DiskAccess resource for using private endpoints on disks.", + nullable=True, + ) + managed_disk_properties.disk_iops_read_only = AAZIntArg( + options=["disk-iops-read-only"], + help="The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.", + nullable=True, + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntArg( + options=["disk-m-bps-read-only"], + help="The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.", + nullable=True, + ) + managed_disk_properties.logical_sector_size = AAZIntArg( + options=["logical-sector-size"], + help="Logical sector size in bytes for Ultra Disks. Supported values are 512 and 4096. 4096 is the default.", + nullable=True, + ) + managed_disk_properties.max_shares = AAZIntArg( + options=["max-shares"], + help="The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. Applies to data disks only.", + nullable=True, + fmt=AAZIntArgFormat( + minimum=1, + ), + ) + managed_disk_properties.network_access_policy = AAZStrArg( + options=["network-access-policy"], + help="Policy for accessing the disk via network.", + nullable=True, + enum={"AllowAll": "AllowAll", "AllowPrivate": "AllowPrivate", "DenyAll": "DenyAll"}, + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolArg( + options=["optimized-for-frequent-attach"], + help="Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.", + nullable=True, + ) + managed_disk_properties.performance_plus = AAZBoolArg( + options=["performance-plus"], + help="Set this flag to true to get a boost on the performance target of the disk deployed. This flag can only be set on disk creation time and cannot be disabled after enabled.", + nullable=True, + ) + managed_disk_properties.tier = AAZStrArg( + options=["tier"], + help="Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.", + nullable=True, + ) + + availability_policy = cls._args_managed_disk_parameters_update.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrArg( + options=["action-on-disk-delay"], + help="Determines how to handle disks with slow I/O.", + nullable=True, + enum={"AutomaticReattach": "AutomaticReattach", "None": "None"}, + ) + security_profile = cls._args_managed_disk_parameters_update.security_profile security_profile.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], @@ -1620,6 +1787,7 @@ def _build_args_managed_disk_parameters_update(cls, _schema): enum={"DiskWithVMGuestState": "DiskWithVMGuestState", "NonPersistedTPM": "NonPersistedTPM", "VMGuestStateOnly": "VMGuestStateOnly"}, ) + _schema.additional_disk_properties = cls._args_managed_disk_parameters_update.additional_disk_properties _schema.disk_encryption_set = cls._args_managed_disk_parameters_update.disk_encryption_set _schema.id = cls._args_managed_disk_parameters_update.id _schema.security_profile = cls._args_managed_disk_parameters_update.security_profile @@ -1743,7 +1911,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -1842,7 +2010,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -1953,6 +2121,7 @@ def _update_instance(self, instance): properties.set_prop("hardwareProfile", AAZObjectType, ".hardware_profile") _UpdateHelper._build_schema_sub_resource_update(properties.set_prop("host", AAZObjectType, ".host")) _UpdateHelper._build_schema_sub_resource_update(properties.set_prop("hostGroup", AAZObjectType, ".host_group")) + properties.set_prop("interconnectBlockProfile", AAZObjectType, ".interconnect_block_profile") properties.set_prop("licenseType", AAZStrType, ".license_type") properties.set_prop("networkProfile", AAZObjectType, ".network_profile") properties.set_prop("osProfile", AAZObjectType, ".os_profile") @@ -1997,6 +2166,7 @@ def _update_instance(self, instance): capacity_reservation = _builder.get(".properties.capacityReservation") if capacity_reservation is not None: _UpdateHelper._build_schema_sub_resource_update(capacity_reservation.set_prop("capacityReservationGroup", AAZObjectType, ".capacity_reservation_group")) + capacity_reservation.set_prop("disableCapacityReservationAssignment", AAZBoolType, ".disable_capacity_reservation_assignment") diagnostics_profile = _builder.get(".properties.diagnosticsProfile") if diagnostics_profile is not None: @@ -2009,6 +2179,7 @@ def _update_instance(self, instance): hardware_profile = _builder.get(".properties.hardwareProfile") if hardware_profile is not None: + hardware_profile.set_prop("processorMode", AAZStrType, ".processor_mode") hardware_profile.set_prop("vmSize", AAZStrType, ".vm_size") hardware_profile.set_prop("vmSizeProperties", AAZObjectType, ".vm_size_properties") @@ -2017,12 +2188,26 @@ def _update_instance(self, instance): vm_size_properties.set_prop("vCPUsAvailable", AAZIntType, ".v_cp_us_available") vm_size_properties.set_prop("vCPUsPerCore", AAZIntType, ".v_cp_us_per_core") + interconnect_block_profile = _builder.get(".properties.interconnectBlockProfile") + if interconnect_block_profile is not None: + _UpdateHelper._build_schema_api_entity_reference_update(interconnect_block_profile.set_prop("interconnectBlock", AAZObjectType, ".interconnect_block")) + network_profile = _builder.get(".properties.networkProfile") if network_profile is not None: + network_profile.set_prop("interconnectGroupProfile", AAZObjectType, ".interconnect_group_profile") network_profile.set_prop("networkApiVersion", AAZStrType, ".network_api_version") network_profile.set_prop("networkInterfaceConfigurations", AAZListType, ".network_interface_configurations") network_profile.set_prop("networkInterfaces", AAZListType, ".network_interfaces") + interconnect_group_profile = _builder.get(".properties.networkProfile.interconnectGroupProfile") + if interconnect_group_profile is not None: + _UpdateHelper._build_schema_sub_resource_update(interconnect_group_profile.set_prop("interconnectGroup", AAZObjectType, ".interconnect_group")) + interconnect_group_profile.set_prop("subgroups", AAZListType, ".subgroups") + + subgroups = _builder.get(".properties.networkProfile.interconnectGroupProfile.subgroups") + if subgroups is not None: + _UpdateHelper._build_schema_sub_resource_update(subgroups.set_elements(AAZObjectType, ".")) + network_interface_configurations = _builder.get(".properties.networkProfile.networkInterfaceConfigurations") if network_interface_configurations is not None: network_interface_configurations.set_elements(AAZObjectType, ".") @@ -2115,6 +2300,7 @@ def _update_instance(self, instance): _elements = _builder.get(".properties.networkProfile.networkInterfaceConfigurations[].properties.ipConfigurations[].properties.publicIPAddressConfiguration.properties.ipTags[]") if _elements is not None: + _elements.set_prop("firstPartyServiceTagId", AAZStrType, ".first_party_service_tag_id") _elements.set_prop("ipTagType", AAZStrType, ".ip_tag_type") _elements.set_prop("tag", AAZStrType, ".tag") @@ -2333,6 +2519,7 @@ def _update_instance(self, instance): if storage_profile is not None: storage_profile.set_prop("alignRegionalDisksToVMZone", AAZBoolType, ".align_regional_disks_to_vm_zone") storage_profile.set_prop("dataDisks", AAZListType, ".data_disks") + storage_profile.set_prop("diskApiVersion", AAZStrType, ".disk_api_version") storage_profile.set_prop("diskControllerType", AAZStrType, ".disk_controller_type") storage_profile.set_prop("imageReference", AAZObjectType, ".image_reference") storage_profile.set_prop("osDisk", AAZObjectType, ".os_disk") @@ -2434,6 +2621,12 @@ def __call__(self, *args, **kwargs): class _UpdateHelper: """Helper class for Update""" + @classmethod + def _build_schema_api_entity_reference_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("id", AAZStrType, ".id") + @classmethod def _build_schema_disk_encryption_set_parameters_update(cls, _builder): if _builder is None: @@ -2446,16 +2639,40 @@ def _build_schema_host_endpoint_settings_update(cls, _builder): return _builder.set_prop("inVMAccessControlProfileReferenceId", AAZStrType, ".in_vm_access_control_profile_reference_id") _builder.set_prop("mode", AAZStrType, ".mode") + _builder.set_prop("useLocalFileRules", AAZBoolType, ".use_local_file_rules") @classmethod def _build_schema_managed_disk_parameters_update(cls, _builder): if _builder is None: return + _builder.set_prop("additionalDiskProperties", AAZObjectType, ".additional_disk_properties") cls._build_schema_disk_encryption_set_parameters_update(_builder.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) _builder.set_prop("id", AAZStrType, ".id") _builder.set_prop("securityProfile", AAZObjectType, ".security_profile") _builder.set_prop("storageAccountType", AAZStrType, ".storage_account_type") + additional_disk_properties = _builder.get(".additionalDiskProperties") + if additional_disk_properties is not None: + additional_disk_properties.set_prop("managedDiskProperties", AAZObjectType, ".managed_disk_properties") + + managed_disk_properties = _builder.get(".additionalDiskProperties.managedDiskProperties") + if managed_disk_properties is not None: + managed_disk_properties.set_prop("availabilityPolicy", AAZObjectType, ".availability_policy") + managed_disk_properties.set_prop("burstingEnabled", AAZBoolType, ".bursting_enabled") + managed_disk_properties.set_prop("diskAccessId", AAZStrType, ".disk_access_id") + managed_disk_properties.set_prop("diskIOPSReadOnly", AAZIntType, ".disk_iops_read_only") + managed_disk_properties.set_prop("diskMBpsReadOnly", AAZIntType, ".disk_m_bps_read_only") + managed_disk_properties.set_prop("logicalSectorSize", AAZIntType, ".logical_sector_size") + managed_disk_properties.set_prop("maxShares", AAZIntType, ".max_shares") + managed_disk_properties.set_prop("networkAccessPolicy", AAZStrType, ".network_access_policy") + managed_disk_properties.set_prop("optimizedForFrequentAttach", AAZBoolType, ".optimized_for_frequent_attach") + managed_disk_properties.set_prop("performancePlus", AAZBoolType, ".performance_plus") + managed_disk_properties.set_prop("tier", AAZStrType, ".tier") + + availability_policy = _builder.get(".additionalDiskProperties.managedDiskProperties.availabilityPolicy") + if availability_policy is not None: + availability_policy.set_prop("actionOnDiskDelay", AAZStrType, ".action_on_disk_delay") + security_profile = _builder.get(".securityProfile") if security_profile is not None: cls._build_schema_disk_encryption_set_parameters_update(security_profile.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) @@ -2473,6 +2690,21 @@ def _build_schema_virtual_hard_disk_update(cls, _builder): return _builder.set_prop("uri", AAZStrType, ".uri") + _schema_api_entity_reference_read = None + + @classmethod + def _build_schema_api_entity_reference_read(cls, _schema): + if cls._schema_api_entity_reference_read is not None: + _schema.id = cls._schema_api_entity_reference_read.id + return + + cls._schema_api_entity_reference_read = _schema_api_entity_reference_read = AAZObjectType() + + api_entity_reference_read = _schema_api_entity_reference_read + api_entity_reference_read.id = AAZStrType() + + _schema.id = cls._schema_api_entity_reference_read.id + _schema_api_error_read = None @classmethod @@ -2573,6 +2805,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -2582,9 +2815,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_instance_view_status_read = None @@ -2645,6 +2882,7 @@ def _build_schema_key_vault_secret_reference_read(cls, _schema): @classmethod def _build_schema_managed_disk_parameters_read(cls, _schema): if cls._schema_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile @@ -2654,6 +2892,9 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): cls._schema_managed_disk_parameters_read = _schema_managed_disk_parameters_read = AAZObjectType() managed_disk_parameters_read = _schema_managed_disk_parameters_read + managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -2666,6 +2907,49 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="storageAccountType", ) + additional_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -2675,6 +2959,7 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile @@ -2950,6 +3235,9 @@ def _build_schema_virtual_machine_read(cls, _schema): serialized_name="instanceView", flags={"read_only": True}, ) + properties.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) properties.license_type = AAZStrType( serialized_name="licenseType", ) @@ -3048,6 +3336,9 @@ def _build_schema_virtual_machine_read(cls, _schema): serialized_name="capacityReservationGroup", ) cls._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = _schema_virtual_machine_read.properties.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -3061,6 +3352,9 @@ def _build_schema_virtual_machine_read(cls, _schema): ) hardware_profile = _schema_virtual_machine_read.properties.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size = AAZStrType( serialized_name="vmSize", ) @@ -3084,6 +3378,10 @@ def _build_schema_virtual_machine_read(cls, _schema): instance_view.boot_diagnostics = AAZObjectType( serialized_name="bootDiagnostics", ) + instance_view.capacity_reservation_type = AAZStrType( + serialized_name="capacityReservationType", + flags={"read_only": True}, + ) instance_view.computer_name = AAZStrType( serialized_name="computerName", ) @@ -3092,6 +3390,10 @@ def _build_schema_virtual_machine_read(cls, _schema): instance_view.hyper_v_generation = AAZStrType( serialized_name="hyperVGeneration", ) + instance_view.interconnect_instance_view = AAZObjectType( + serialized_name="interconnectInstanceView", + flags={"read_only": True}, + ) instance_view.is_vm_in_standby_pool = AAZBoolType( serialized_name="isVMInStandbyPool", flags={"read_only": True}, @@ -3165,6 +3467,12 @@ def _build_schema_virtual_machine_read(cls, _schema): extensions.Element = AAZObjectType() cls._build_schema_virtual_machine_extension_instance_view_read(extensions.Element) + interconnect_instance_view = _schema_virtual_machine_read.properties.instance_view.interconnect_instance_view + interconnect_instance_view.interconnect_subgroup_id = AAZStrType( + serialized_name="interconnectSubgroupId", + flags={"read_only": True}, + ) + maintenance_redeploy_status = _schema_virtual_machine_read.properties.instance_view.maintenance_redeploy_status maintenance_redeploy_status.is_customer_initiated_maintenance_allowed = AAZBoolType( serialized_name="isCustomerInitiatedMaintenanceAllowed", @@ -3316,7 +3624,16 @@ def _build_schema_virtual_machine_read(cls, _schema): ) cls._build_schema_instance_view_status_read(vm_health.status) + interconnect_block_profile = _schema_virtual_machine_read.properties.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + cls._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = _schema_virtual_machine_read.properties.network_profile + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -3327,6 +3644,17 @@ def _build_schema_virtual_machine_read(cls, _schema): serialized_name="networkInterfaces", ) + interconnect_group_profile = _schema_virtual_machine_read.properties.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + cls._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = _schema_virtual_machine_read.properties.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + cls._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = _schema_virtual_machine_read.properties.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -3476,6 +3804,9 @@ def _build_schema_virtual_machine_read(cls, _schema): ip_tags.Element = AAZObjectType() _element = _schema_virtual_machine_read.properties.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -3801,6 +4132,9 @@ def _build_schema_virtual_machine_read(cls, _schema): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) @@ -3848,6 +4182,7 @@ def _build_schema_virtual_machine_read(cls, _schema): _element.source_resource = AAZObjectType( serialized_name="sourceResource", ) + cls._build_schema_api_entity_reference_read(_element.source_resource) _element.storage_fault_domain_alignment = AAZStrType( serialized_name="storageFaultDomainAlignment", ) @@ -3860,9 +4195,6 @@ def _build_schema_virtual_machine_read(cls, _schema): serialized_name="writeAcceleratorEnabled", ) - source_resource = _schema_virtual_machine_read.properties.storage_profile.data_disks.Element.source_resource - source_resource.id = AAZStrType() - image_reference = _schema_virtual_machine_read.properties.storage_profile.image_reference image_reference.community_gallery_image_id = AAZStrType( serialized_name="communityGalleryImageId", diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_wait.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_wait.py index ba0630f8192..f5edb383229 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_wait.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachines/{}", "2026-04-01"], ] } @@ -124,7 +124,7 @@ def query_parameters(self): "$expand", self.ctx.args.expand, ), **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -291,6 +291,9 @@ def _build_schema_on_200(cls): serialized_name="instanceView", flags={"read_only": True}, ) + properties.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) properties.license_type = AAZStrType( serialized_name="licenseType", ) @@ -389,6 +392,9 @@ def _build_schema_on_200(cls): serialized_name="capacityReservationGroup", ) _WaitHelper._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = cls._schema_on_200.properties.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -402,6 +408,9 @@ def _build_schema_on_200(cls): ) hardware_profile = cls._schema_on_200.properties.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size = AAZStrType( serialized_name="vmSize", ) @@ -425,6 +434,10 @@ def _build_schema_on_200(cls): instance_view.boot_diagnostics = AAZObjectType( serialized_name="bootDiagnostics", ) + instance_view.capacity_reservation_type = AAZStrType( + serialized_name="capacityReservationType", + flags={"read_only": True}, + ) instance_view.computer_name = AAZStrType( serialized_name="computerName", ) @@ -433,6 +446,10 @@ def _build_schema_on_200(cls): instance_view.hyper_v_generation = AAZStrType( serialized_name="hyperVGeneration", ) + instance_view.interconnect_instance_view = AAZObjectType( + serialized_name="interconnectInstanceView", + flags={"read_only": True}, + ) instance_view.is_vm_in_standby_pool = AAZBoolType( serialized_name="isVMInStandbyPool", flags={"read_only": True}, @@ -506,6 +523,12 @@ def _build_schema_on_200(cls): extensions.Element = AAZObjectType() _WaitHelper._build_schema_virtual_machine_extension_instance_view_read(extensions.Element) + interconnect_instance_view = cls._schema_on_200.properties.instance_view.interconnect_instance_view + interconnect_instance_view.interconnect_subgroup_id = AAZStrType( + serialized_name="interconnectSubgroupId", + flags={"read_only": True}, + ) + maintenance_redeploy_status = cls._schema_on_200.properties.instance_view.maintenance_redeploy_status maintenance_redeploy_status.is_customer_initiated_maintenance_allowed = AAZBoolType( serialized_name="isCustomerInitiatedMaintenanceAllowed", @@ -657,7 +680,16 @@ def _build_schema_on_200(cls): ) _WaitHelper._build_schema_instance_view_status_read(vm_health.status) + interconnect_block_profile = cls._schema_on_200.properties.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + _WaitHelper._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = cls._schema_on_200.properties.network_profile + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -668,6 +700,17 @@ def _build_schema_on_200(cls): serialized_name="networkInterfaces", ) + interconnect_group_profile = cls._schema_on_200.properties.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + _WaitHelper._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = cls._schema_on_200.properties.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + _WaitHelper._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = cls._schema_on_200.properties.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -817,6 +860,9 @@ def _build_schema_on_200(cls): ip_tags.Element = AAZObjectType() _element = cls._schema_on_200.properties.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -1142,6 +1188,9 @@ def _build_schema_on_200(cls): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) @@ -1189,6 +1238,7 @@ def _build_schema_on_200(cls): _element.source_resource = AAZObjectType( serialized_name="sourceResource", ) + _WaitHelper._build_schema_api_entity_reference_read(_element.source_resource) _element.storage_fault_domain_alignment = AAZStrType( serialized_name="storageFaultDomainAlignment", ) @@ -1201,9 +1251,6 @@ def _build_schema_on_200(cls): serialized_name="writeAcceleratorEnabled", ) - source_resource = cls._schema_on_200.properties.storage_profile.data_disks.Element.source_resource - source_resource.id = AAZStrType() - image_reference = cls._schema_on_200.properties.storage_profile.image_reference image_reference.community_gallery_image_id = AAZStrType( serialized_name="communityGalleryImageId", @@ -1348,6 +1395,21 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" + _schema_api_entity_reference_read = None + + @classmethod + def _build_schema_api_entity_reference_read(cls, _schema): + if cls._schema_api_entity_reference_read is not None: + _schema.id = cls._schema_api_entity_reference_read.id + return + + cls._schema_api_entity_reference_read = _schema_api_entity_reference_read = AAZObjectType() + + api_entity_reference_read = _schema_api_entity_reference_read + api_entity_reference_read.id = AAZStrType() + + _schema.id = cls._schema_api_entity_reference_read.id + _schema_api_error_read = None @classmethod @@ -1448,6 +1510,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -1457,9 +1520,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_instance_view_status_read = None @@ -1520,6 +1587,7 @@ def _build_schema_key_vault_secret_reference_read(cls, _schema): @classmethod def _build_schema_managed_disk_parameters_read(cls, _schema): if cls._schema_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile @@ -1529,6 +1597,9 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): cls._schema_managed_disk_parameters_read = _schema_managed_disk_parameters_read = AAZObjectType() managed_disk_parameters_read = _schema_managed_disk_parameters_read + managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -1541,6 +1612,49 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="storageAccountType", ) + additional_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -1550,6 +1664,7 @@ def _build_schema_managed_disk_parameters_read(cls, _schema): serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_managed_disk_parameters_read.disk_encryption_set _schema.id = cls._schema_managed_disk_parameters_read.id _schema.security_profile = cls._schema_managed_disk_parameters_read.security_profile diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_create.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_create.py index 41bff2ee3c6..0397317aa3f 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_create.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_create.py @@ -16,9 +16,9 @@ class Create(AAZCommand): """ _aaz_info = { - "version": "2025-11-01", + "version": "2026-04-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2026-04-01"], ] } @@ -589,11 +589,21 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Specifies the allocation strategy for the virtual machine scale set based on which the VMs will be allocated.", enum={"CapacityOptimized": "CapacityOptimized", "LowestPrice": "LowestPrice", "Prioritized": "Prioritized"}, ) + sku_profile.automatic_sku_migration_policy = AAZObjectArg( + options=["automatic-sku-migration-policy"], + help="Specifies the policy that controls whether the platform may automatically migrate scale set instances to a different VM size from the SKU profile depending on platform demands. When omitted, automatic SKU migration is disabled.", + ) sku_profile.vm_sizes = AAZListArg( options=["vm-sizes"], help="Specifies the VM sizes for the virtual machine scale set.", ) + automatic_sku_migration_policy = cls._args_schema.sku_profile.automatic_sku_migration_policy + automatic_sku_migration_policy.enabled = AAZBoolArg( + options=["enabled"], + help="Specifies whether automatic SKU migration should be enabled on the virtual machine scale set. The default value is false.", + ) + vm_sizes = cls._args_schema.sku_profile.vm_sizes vm_sizes.Element = AAZObjectArg() @@ -725,6 +735,10 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["hardware-profile"], help="Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.", ) + virtual_machine_profile.interconnect_block_profile = AAZObjectArg( + options=["interconnect-block-profile"], + help="Specifies the Interconnect Block related details of a Scale Set. Minimum api-version: 2026-03-01.", + ) virtual_machine_profile.license_type = AAZStrArg( options=["license-type"], help="Specifies that the image or disk that is being used was licensed on-premises.

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](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15", @@ -740,7 +754,7 @@ def _build_arguments_schema(cls, *args, **kwargs): virtual_machine_profile.priority = AAZStrArg( options=["priority"], help="Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview.", - enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot"}, + enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot", "SpotPlus": "SpotPlus"}, ) virtual_machine_profile.scheduled_events_profile = AAZObjectArg( options=["scheduled-events-profile"], @@ -815,6 +829,10 @@ def _build_arguments_schema(cls, *args, **kwargs): help="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 for more details.", ) cls._build_args_sub_resource_create(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolArg( + options=["disable-capacity-reservation-assignment"], + help="Specifies whether the virtual machine is explicitly opted out from being associated with any capacity reservation. When set to true, the virtual machine will not be allowed to implicitly or explicitly associate with any type of capacity reservation and will consume capacity from the publicly available capacity. Minimum api-version: 2026-04-01.", + ) diagnostics_profile = cls._args_schema.virtual_machine_profile.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectArg( @@ -914,6 +932,11 @@ def _build_arguments_schema(cls, *args, **kwargs): provision_after_extensions.Element = AAZStrArg() hardware_profile = cls._args_schema.virtual_machine_profile.hardware_profile + hardware_profile.processor_mode = AAZStrArg( + options=["processor-mode"], + help="Specifies the processor mode for the virtual machine scale set. Optional; if omitted, the platform default applies (currently Deterministic). This property can be updated on a running VMSS without deallocation or reboot. Minimum api-version: 2026-04-01.", + enum={"Deterministic": "Deterministic", "Opportunistic": "Opportunistic"}, + ) hardware_profile.vm_size_properties = AAZObjectArg( options=["vm-size-properties"], help="Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details.", @@ -929,12 +952,23 @@ def _build_arguments_schema(cls, *args, **kwargs): help="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](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**", ) + interconnect_block_profile = cls._args_schema.virtual_machine_profile.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectArg( + options=["interconnect-block"], + help="Specifies the Interconnect Block resource ID that should be used for allocating the Virtual Machine or Scale Set VM instances provided enough capacity has been reserved.", + ) + cls._build_args_api_entity_reference_create(interconnect_block_profile.interconnect_block) + network_profile = cls._args_schema.virtual_machine_profile.network_profile network_profile.health_probe = AAZObjectArg( options=["health-probe"], help="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}'.", ) cls._build_args_api_entity_reference_create(network_profile.health_probe) + network_profile.interconnect_group_profile = AAZObjectArg( + options=["interconnect-group-profile"], + help="Specifies the interconnect group profile to associate with the scale set. Minimum api-version: 2026-03-01.", + ) network_profile.network_api_version = AAZStrArg( options=["network-api-version"], help="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'", @@ -945,6 +979,21 @@ def _build_arguments_schema(cls, *args, **kwargs): help="The list of network configurations.", ) + interconnect_group_profile = cls._args_schema.virtual_machine_profile.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectArg( + options=["interconnect-group"], + help="Reference to the interconnect group resource.", + ) + cls._build_args_sub_resource_create(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListArg( + options=["subgroups"], + help="The list of subgroup references within the interconnect group.", + ) + + subgroups = cls._args_schema.virtual_machine_profile.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectArg() + cls._build_args_sub_resource_create(subgroups.Element) + network_interface_configurations = cls._args_schema.virtual_machine_profile.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectArg() @@ -1134,6 +1183,10 @@ def _build_arguments_schema(cls, *args, **kwargs): ip_tags.Element = AAZObjectArg() _element = cls._args_schema.virtual_machine_profile.network_profile.network_interface_configurations.Element.ip_configurations.Element.public_ip_address_configuration.ip_tags.Element + _element.first_party_service_tag_id = AAZResourceIdArg( + options=["first-party-service-tag-id"], + help="The first party service tag resource identifier associated with the public IP address.", + ) _element.ip_tag_type = AAZStrArg( options=["ip-tag-type"], help="IP tag type. Example: FirstPartyUsage.", @@ -1525,6 +1578,11 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["data-disks"], help="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](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", ) + storage_profile.disk_api_version = AAZStrArg( + options=["disk-api-version"], + help="Specifies the Disk API version used when applying additionalDiskProperties to managed disks. The value must be in the format YYYY-MM-DD (e.g., \"2026-03-02\").", + enum={"2025-01-02": "2025-01-02", "2026-03-02": "2026-03-02"}, + ) storage_profile.disk_controller_type = AAZStrArg( options=["disk-controller-type"], help="Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01", @@ -1751,6 +1809,7 @@ def _build_args_host_endpoint_settings_create(cls, _schema): if cls._args_host_endpoint_settings_create is not None: _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_create.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_create.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_create.use_local_file_rules return cls._args_host_endpoint_settings_create = AAZObjectArg() @@ -1765,9 +1824,14 @@ def _build_args_host_endpoint_settings_create(cls, _schema): help="Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.", enum={"Audit": "Audit", "Disabled": "Disabled", "Enforce": "Enforce"}, ) + host_endpoint_settings_create.use_local_file_rules = AAZBoolArg( + options=["use-local-file-rules"], + help="When set to true, instructs the GuestProxyAgent inside the VM to load additional access control rules defined in a local file on the VM.", + ) _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_create.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_create.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_create.use_local_file_rules _args_sub_resource_create = None @@ -1792,6 +1856,7 @@ def _build_args_sub_resource_create(cls, _schema): @classmethod def _build_args_virtual_machine_scale_set_managed_disk_parameters_create(cls, _schema): if cls._args_virtual_machine_scale_set_managed_disk_parameters_create is not None: + _schema.additional_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.additional_disk_properties _schema.disk_encryption_set = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.disk_encryption_set _schema.security_profile = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.security_profile _schema.storage_account_type = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.storage_account_type @@ -1800,6 +1865,10 @@ def _build_args_virtual_machine_scale_set_managed_disk_parameters_create(cls, _s cls._args_virtual_machine_scale_set_managed_disk_parameters_create = AAZObjectArg() virtual_machine_scale_set_managed_disk_parameters_create = cls._args_virtual_machine_scale_set_managed_disk_parameters_create + virtual_machine_scale_set_managed_disk_parameters_create.additional_disk_properties = AAZObjectArg( + options=["additional-disk-properties"], + help="Specifies additional properties for the managed disk that can be set at the time of implicit creation of the disk. This property is not captured for Restore Points.", + ) virtual_machine_scale_set_managed_disk_parameters_create.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], help="Specifies the customer managed disk encryption set resource id for the managed disk.", @@ -1815,6 +1884,69 @@ def _build_args_virtual_machine_scale_set_managed_disk_parameters_create(cls, _s enum={"PremiumV2_LRS": "PremiumV2_LRS", "Premium_LRS": "Premium_LRS", "Premium_ZRS": "Premium_ZRS", "StandardSSD_LRS": "StandardSSD_LRS", "StandardSSD_ZRS": "StandardSSD_ZRS", "Standard_LRS": "Standard_LRS", "UltraSSD_LRS": "UltraSSD_LRS"}, ) + additional_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectArg( + options=["managed-disk-properties"], + help="Specifies the managed disk properties that can be set at the time of implicit creation of the disk.", + ) + + managed_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectArg( + options=["availability-policy"], + help="In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.", + ) + managed_disk_properties.bursting_enabled = AAZBoolArg( + options=["bursting-enabled"], + help="Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.", + ) + managed_disk_properties.disk_access_id = AAZStrArg( + options=["disk-access-id"], + help="Azure resource Id of the DiskAccess resource for using private endpoints on disks.", + ) + managed_disk_properties.disk_iops_read_only = AAZIntArg( + options=["disk-iops-read-only"], + help="The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntArg( + options=["disk-m-bps-read-only"], + help="The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.", + ) + managed_disk_properties.logical_sector_size = AAZIntArg( + options=["logical-sector-size"], + help="Logical sector size in bytes for Ultra Disks. Supported values are 512 and 4096. 4096 is the default.", + ) + managed_disk_properties.max_shares = AAZIntArg( + options=["max-shares"], + help="The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. Applies to data disks only.", + fmt=AAZIntArgFormat( + minimum=1, + ), + ) + managed_disk_properties.network_access_policy = AAZStrArg( + options=["network-access-policy"], + help="Policy for accessing the disk via network.", + enum={"AllowAll": "AllowAll", "AllowPrivate": "AllowPrivate", "DenyAll": "DenyAll"}, + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolArg( + options=["optimized-for-frequent-attach"], + help="Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.", + ) + managed_disk_properties.performance_plus = AAZBoolArg( + options=["performance-plus"], + help="Set this flag to true to get a boost on the performance target of the disk deployed. This flag can only be set on disk creation time and cannot be disabled after enabled.", + ) + managed_disk_properties.tier = AAZStrArg( + options=["tier"], + help="Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.", + ) + + availability_policy = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrArg( + options=["action-on-disk-delay"], + help="Determines how to handle disks with slow I/O.", + enum={"AutomaticReattach": "AutomaticReattach", "None": "None"}, + ) + security_profile = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.security_profile security_profile.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], @@ -1827,6 +1959,7 @@ def _build_args_virtual_machine_scale_set_managed_disk_parameters_create(cls, _s enum={"DiskWithVMGuestState": "DiskWithVMGuestState", "NonPersistedTPM": "NonPersistedTPM", "VMGuestStateOnly": "VMGuestStateOnly"}, ) + _schema.additional_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.additional_disk_properties _schema.disk_encryption_set = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.disk_encryption_set _schema.security_profile = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.security_profile _schema.storage_account_type = cls._args_virtual_machine_scale_set_managed_disk_parameters_create.storage_account_type @@ -1912,7 +2045,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -2148,8 +2281,13 @@ def content(self): sku_profile = _builder.get(".properties.skuProfile") if sku_profile is not None: sku_profile.set_prop("allocationStrategy", AAZStrType, ".allocation_strategy") + sku_profile.set_prop("automaticSkuMigrationPolicy", AAZObjectType, ".automatic_sku_migration_policy") sku_profile.set_prop("vmSizes", AAZListType, ".vm_sizes") + automatic_sku_migration_policy = _builder.get(".properties.skuProfile.automaticSkuMigrationPolicy") + if automatic_sku_migration_policy is not None: + automatic_sku_migration_policy.set_prop("enabled", AAZBoolType, ".enabled") + vm_sizes = _builder.get(".properties.skuProfile.vmSizes") if vm_sizes is not None: vm_sizes.set_elements(AAZObjectType, ".") @@ -2197,6 +2335,7 @@ def content(self): virtual_machine_profile.set_prop("evictionPolicy", AAZStrType, ".eviction_policy") virtual_machine_profile.set_prop("extensionProfile", AAZObjectType, ".extension_profile") virtual_machine_profile.set_prop("hardwareProfile", AAZObjectType, ".hardware_profile") + virtual_machine_profile.set_prop("interconnectBlockProfile", AAZObjectType, ".interconnect_block_profile") virtual_machine_profile.set_prop("licenseType", AAZStrType, ".license_type") virtual_machine_profile.set_prop("networkProfile", AAZObjectType, ".network_profile") virtual_machine_profile.set_prop("osProfile", AAZObjectType, ".os_profile") @@ -2232,6 +2371,7 @@ def content(self): capacity_reservation = _builder.get(".properties.virtualMachineProfile.capacityReservation") if capacity_reservation is not None: _CreateHelper._build_schema_sub_resource_create(capacity_reservation.set_prop("capacityReservationGroup", AAZObjectType, ".capacity_reservation_group")) + capacity_reservation.set_prop("disableCapacityReservationAssignment", AAZBoolType, ".disable_capacity_reservation_assignment") diagnostics_profile = _builder.get(".properties.virtualMachineProfile.diagnosticsProfile") if diagnostics_profile is not None: @@ -2281,6 +2421,7 @@ def content(self): hardware_profile = _builder.get(".properties.virtualMachineProfile.hardwareProfile") if hardware_profile is not None: + hardware_profile.set_prop("processorMode", AAZStrType, ".processor_mode") hardware_profile.set_prop("vmSizeProperties", AAZObjectType, ".vm_size_properties") vm_size_properties = _builder.get(".properties.virtualMachineProfile.hardwareProfile.vmSizeProperties") @@ -2288,12 +2429,26 @@ def content(self): vm_size_properties.set_prop("vCPUsAvailable", AAZIntType, ".v_cp_us_available") vm_size_properties.set_prop("vCPUsPerCore", AAZIntType, ".v_cp_us_per_core") + interconnect_block_profile = _builder.get(".properties.virtualMachineProfile.interconnectBlockProfile") + if interconnect_block_profile is not None: + _CreateHelper._build_schema_api_entity_reference_create(interconnect_block_profile.set_prop("interconnectBlock", AAZObjectType, ".interconnect_block")) + network_profile = _builder.get(".properties.virtualMachineProfile.networkProfile") if network_profile is not None: _CreateHelper._build_schema_api_entity_reference_create(network_profile.set_prop("healthProbe", AAZObjectType, ".health_probe")) + network_profile.set_prop("interconnectGroupProfile", AAZObjectType, ".interconnect_group_profile") network_profile.set_prop("networkApiVersion", AAZStrType, ".network_api_version") network_profile.set_prop("networkInterfaceConfigurations", AAZListType, ".network_interface_configurations") + interconnect_group_profile = _builder.get(".properties.virtualMachineProfile.networkProfile.interconnectGroupProfile") + if interconnect_group_profile is not None: + _CreateHelper._build_schema_sub_resource_create(interconnect_group_profile.set_prop("interconnectGroup", AAZObjectType, ".interconnect_group")) + interconnect_group_profile.set_prop("subgroups", AAZListType, ".subgroups") + + subgroups = _builder.get(".properties.virtualMachineProfile.networkProfile.interconnectGroupProfile.subgroups") + if subgroups is not None: + _CreateHelper._build_schema_sub_resource_create(subgroups.set_elements(AAZObjectType, ".")) + network_interface_configurations = _builder.get(".properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations") if network_interface_configurations is not None: network_interface_configurations.set_elements(AAZObjectType, ".") @@ -2389,6 +2544,7 @@ def content(self): _elements = _builder.get(".properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations[].properties.ipConfigurations[].properties.publicIPAddressConfiguration.properties.ipTags[]") if _elements is not None: + _elements.set_prop("firstPartyServiceTagId", AAZStrType, ".first_party_service_tag_id") _elements.set_prop("ipTagType", AAZStrType, ".ip_tag_type") _elements.set_prop("tag", AAZStrType, ".tag") @@ -2570,6 +2726,7 @@ def content(self): storage_profile = _builder.get(".properties.virtualMachineProfile.storageProfile") if storage_profile is not None: storage_profile.set_prop("dataDisks", AAZListType, ".data_disks") + storage_profile.set_prop("diskApiVersion", AAZStrType, ".disk_api_version") storage_profile.set_prop("diskControllerType", AAZStrType, ".disk_controller_type") storage_profile.set_prop("imageReference", AAZObjectType, ".image_reference") storage_profile.set_prop("osDisk", AAZObjectType, ".os_disk") @@ -3010,10 +3167,16 @@ def _build_schema_on_200_201(cls): sku_profile.allocation_strategy = AAZStrType( serialized_name="allocationStrategy", ) + sku_profile.automatic_sku_migration_policy = AAZObjectType( + serialized_name="automaticSkuMigrationPolicy", + ) sku_profile.vm_sizes = AAZListType( serialized_name="vmSizes", ) + automatic_sku_migration_policy = cls._schema_on_200_201.properties.sku_profile.automatic_sku_migration_policy + automatic_sku_migration_policy.enabled = AAZBoolType() + vm_sizes = cls._schema_on_200_201.properties.sku_profile.vm_sizes vm_sizes.Element = AAZObjectType() @@ -3098,6 +3261,9 @@ def _build_schema_on_200_201(cls): virtual_machine_profile.hardware_profile = AAZObjectType( serialized_name="hardwareProfile", ) + virtual_machine_profile.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) virtual_machine_profile.license_type = AAZStrType( serialized_name="licenseType", ) @@ -3166,6 +3332,9 @@ def _build_schema_on_200_201(cls): serialized_name="capacityReservationGroup", ) _CreateHelper._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = cls._schema_on_200_201.properties.virtual_machine_profile.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -3247,6 +3416,9 @@ def _build_schema_on_200_201(cls): provision_after_extensions.Element = AAZStrType() hardware_profile = cls._schema_on_200_201.properties.virtual_machine_profile.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", ) @@ -3259,11 +3431,20 @@ def _build_schema_on_200_201(cls): serialized_name="vCPUsPerCore", ) + interconnect_block_profile = cls._schema_on_200_201.properties.virtual_machine_profile.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + _CreateHelper._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = cls._schema_on_200_201.properties.virtual_machine_profile.network_profile network_profile.health_probe = AAZObjectType( serialized_name="healthProbe", ) _CreateHelper._build_schema_api_entity_reference_read(network_profile.health_probe) + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -3271,6 +3452,17 @@ def _build_schema_on_200_201(cls): serialized_name="networkInterfaceConfigurations", ) + interconnect_group_profile = cls._schema_on_200_201.properties.virtual_machine_profile.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + _CreateHelper._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = cls._schema_on_200_201.properties.virtual_machine_profile.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + _CreateHelper._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = cls._schema_on_200_201.properties.virtual_machine_profile.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -3420,6 +3612,9 @@ def _build_schema_on_200_201(cls): ip_tags.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.virtual_machine_profile.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -3694,6 +3889,9 @@ def _build_schema_on_200_201(cls): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) @@ -3859,6 +4057,7 @@ def _build_schema_host_endpoint_settings_create(cls, _builder): return _builder.set_prop("inVMAccessControlProfileReferenceId", AAZStrType, ".in_vm_access_control_profile_reference_id") _builder.set_prop("mode", AAZStrType, ".mode") + _builder.set_prop("useLocalFileRules", AAZBoolType, ".use_local_file_rules") @classmethod def _build_schema_sub_resource_create(cls, _builder): @@ -3870,10 +4069,33 @@ def _build_schema_sub_resource_create(cls, _builder): def _build_schema_virtual_machine_scale_set_managed_disk_parameters_create(cls, _builder): if _builder is None: return + _builder.set_prop("additionalDiskProperties", AAZObjectType, ".additional_disk_properties") cls._build_schema_disk_encryption_set_parameters_create(_builder.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) _builder.set_prop("securityProfile", AAZObjectType, ".security_profile") _builder.set_prop("storageAccountType", AAZStrType, ".storage_account_type") + additional_disk_properties = _builder.get(".additionalDiskProperties") + if additional_disk_properties is not None: + additional_disk_properties.set_prop("managedDiskProperties", AAZObjectType, ".managed_disk_properties") + + managed_disk_properties = _builder.get(".additionalDiskProperties.managedDiskProperties") + if managed_disk_properties is not None: + managed_disk_properties.set_prop("availabilityPolicy", AAZObjectType, ".availability_policy") + managed_disk_properties.set_prop("burstingEnabled", AAZBoolType, ".bursting_enabled") + managed_disk_properties.set_prop("diskAccessId", AAZStrType, ".disk_access_id") + managed_disk_properties.set_prop("diskIOPSReadOnly", AAZIntType, ".disk_iops_read_only") + managed_disk_properties.set_prop("diskMBpsReadOnly", AAZIntType, ".disk_m_bps_read_only") + managed_disk_properties.set_prop("logicalSectorSize", AAZIntType, ".logical_sector_size") + managed_disk_properties.set_prop("maxShares", AAZIntType, ".max_shares") + managed_disk_properties.set_prop("networkAccessPolicy", AAZStrType, ".network_access_policy") + managed_disk_properties.set_prop("optimizedForFrequentAttach", AAZBoolType, ".optimized_for_frequent_attach") + managed_disk_properties.set_prop("performancePlus", AAZBoolType, ".performance_plus") + managed_disk_properties.set_prop("tier", AAZStrType, ".tier") + + availability_policy = _builder.get(".additionalDiskProperties.managedDiskProperties.availabilityPolicy") + if availability_policy is not None: + availability_policy.set_prop("actionOnDiskDelay", AAZStrType, ".action_on_disk_delay") + security_profile = _builder.get(".securityProfile") if security_profile is not None: cls._build_schema_disk_encryption_set_parameters_create(security_profile.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) @@ -3916,6 +4138,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -3925,9 +4148,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_sub_resource_read = None @@ -3949,6 +4176,7 @@ def _build_schema_sub_resource_read(cls, _schema): @classmethod def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _schema): if cls._schema_virtual_machine_scale_set_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type @@ -3957,6 +4185,9 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s cls._schema_virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read = AAZObjectType() virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read + virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -3968,6 +4199,49 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="storageAccountType", ) + additional_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -3977,6 +4251,7 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_show.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_show.py index ca1746349c1..b3c9408de34 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_show.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_show.py @@ -16,9 +16,9 @@ class Show(AAZCommand): """ _aaz_info = { - "version": "2025-11-01", + "version": "2026-04-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2026-04-01"], ] } @@ -122,7 +122,7 @@ def query_parameters(self): "$expand", self.ctx.args.expand, ), **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -500,10 +500,16 @@ def _build_schema_on_200(cls): sku_profile.allocation_strategy = AAZStrType( serialized_name="allocationStrategy", ) + sku_profile.automatic_sku_migration_policy = AAZObjectType( + serialized_name="automaticSkuMigrationPolicy", + ) sku_profile.vm_sizes = AAZListType( serialized_name="vmSizes", ) + automatic_sku_migration_policy = cls._schema_on_200.properties.sku_profile.automatic_sku_migration_policy + automatic_sku_migration_policy.enabled = AAZBoolType() + vm_sizes = cls._schema_on_200.properties.sku_profile.vm_sizes vm_sizes.Element = AAZObjectType() @@ -588,6 +594,9 @@ def _build_schema_on_200(cls): virtual_machine_profile.hardware_profile = AAZObjectType( serialized_name="hardwareProfile", ) + virtual_machine_profile.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) virtual_machine_profile.license_type = AAZStrType( serialized_name="licenseType", ) @@ -656,6 +665,9 @@ def _build_schema_on_200(cls): serialized_name="capacityReservationGroup", ) _ShowHelper._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = cls._schema_on_200.properties.virtual_machine_profile.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -737,6 +749,9 @@ def _build_schema_on_200(cls): provision_after_extensions.Element = AAZStrType() hardware_profile = cls._schema_on_200.properties.virtual_machine_profile.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", ) @@ -749,11 +764,20 @@ def _build_schema_on_200(cls): serialized_name="vCPUsPerCore", ) + interconnect_block_profile = cls._schema_on_200.properties.virtual_machine_profile.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + _ShowHelper._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = cls._schema_on_200.properties.virtual_machine_profile.network_profile network_profile.health_probe = AAZObjectType( serialized_name="healthProbe", ) _ShowHelper._build_schema_api_entity_reference_read(network_profile.health_probe) + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -761,6 +785,17 @@ def _build_schema_on_200(cls): serialized_name="networkInterfaceConfigurations", ) + interconnect_group_profile = cls._schema_on_200.properties.virtual_machine_profile.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + _ShowHelper._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = cls._schema_on_200.properties.virtual_machine_profile.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + _ShowHelper._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = cls._schema_on_200.properties.virtual_machine_profile.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -910,6 +945,9 @@ def _build_schema_on_200(cls): ip_tags.Element = AAZObjectType() _element = cls._schema_on_200.properties.virtual_machine_profile.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -1184,6 +1222,9 @@ def _build_schema_on_200(cls): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) @@ -1368,6 +1409,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -1377,9 +1419,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_sub_resource_read = None @@ -1401,6 +1447,7 @@ def _build_schema_sub_resource_read(cls, _schema): @classmethod def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _schema): if cls._schema_virtual_machine_scale_set_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type @@ -1409,6 +1456,9 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s cls._schema_virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read = AAZObjectType() virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read + virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -1420,6 +1470,49 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="storageAccountType", ) + additional_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -1429,6 +1522,7 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_update.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_update.py index 7f50fb6b0aa..c6da01e2484 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_update.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_update.py @@ -16,9 +16,9 @@ class Update(AAZCommand): """ _aaz_info = { - "version": "2025-11-01", + "version": "2026-04-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2026-04-01"], ] } @@ -676,12 +676,24 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, enum={"CapacityOptimized": "CapacityOptimized", "LowestPrice": "LowestPrice", "Prioritized": "Prioritized"}, ) + sku_profile.automatic_sku_migration_policy = AAZObjectArg( + options=["automatic-sku-migration-policy"], + help="Specifies the policy that controls whether the platform may automatically migrate scale set instances to a different VM size from the SKU profile depending on platform demands. When omitted, automatic SKU migration is disabled.", + nullable=True, + ) sku_profile.vm_sizes = AAZListArg( options=["vm-sizes"], help="Specifies the VM sizes for the virtual machine scale set.", nullable=True, ) + automatic_sku_migration_policy = cls._args_schema.sku_profile.automatic_sku_migration_policy + automatic_sku_migration_policy.enabled = AAZBoolArg( + options=["enabled"], + help="Specifies whether automatic SKU migration should be enabled on the virtual machine scale set. The default value is false.", + nullable=True, + ) + vm_sizes = cls._args_schema.sku_profile.vm_sizes vm_sizes.Element = AAZObjectArg( nullable=True, @@ -841,6 +853,11 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.", nullable=True, ) + virtual_machine_profile.interconnect_block_profile = AAZObjectArg( + options=["interconnect-block-profile"], + help="Specifies the Interconnect Block related details of a Scale Set. Minimum api-version: 2026-03-01.", + nullable=True, + ) virtual_machine_profile.license_type = AAZStrArg( options=["license-type"], help="Specifies that the image or disk that is being used was licensed on-premises.

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](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15", @@ -860,7 +877,7 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["priority"], help="Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview.", nullable=True, - enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot"}, + enum={"Low": "Low", "Regular": "Regular", "Spot": "Spot", "SpotPlus": "SpotPlus"}, ) virtual_machine_profile.scheduled_events_profile = AAZObjectArg( options=["scheduled-events-profile"], @@ -950,6 +967,11 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) cls._build_args_sub_resource_update(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolArg( + options=["disable-capacity-reservation-assignment"], + help="Specifies whether the virtual machine is explicitly opted out from being associated with any capacity reservation. When set to true, the virtual machine will not be allowed to implicitly or explicitly associate with any type of capacity reservation and will consume capacity from the publicly available capacity. Minimum api-version: 2026-04-01.", + nullable=True, + ) diagnostics_profile = cls._args_schema.virtual_machine_profile.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectArg( @@ -1069,6 +1091,12 @@ def _build_arguments_schema(cls, *args, **kwargs): ) hardware_profile = cls._args_schema.virtual_machine_profile.hardware_profile + hardware_profile.processor_mode = AAZStrArg( + options=["processor-mode"], + help="Specifies the processor mode for the virtual machine scale set. Optional; if omitted, the platform default applies (currently Deterministic). This property can be updated on a running VMSS without deallocation or reboot. Minimum api-version: 2026-04-01.", + nullable=True, + enum={"Deterministic": "Deterministic", "Opportunistic": "Opportunistic"}, + ) hardware_profile.vm_size_properties = AAZObjectArg( options=["vm-size-properties"], help="Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details.", @@ -1087,6 +1115,14 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) + interconnect_block_profile = cls._args_schema.virtual_machine_profile.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectArg( + options=["interconnect-block"], + help="Specifies the Interconnect Block resource ID that should be used for allocating the Virtual Machine or Scale Set VM instances provided enough capacity has been reserved.", + nullable=True, + ) + cls._build_args_api_entity_reference_update(interconnect_block_profile.interconnect_block) + network_profile = cls._args_schema.virtual_machine_profile.network_profile network_profile.health_probe = AAZObjectArg( options=["health-probe"], @@ -1094,6 +1130,11 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) cls._build_args_api_entity_reference_update(network_profile.health_probe) + network_profile.interconnect_group_profile = AAZObjectArg( + options=["interconnect-group-profile"], + help="Specifies the interconnect group profile to associate with the scale set. Minimum api-version: 2026-03-01.", + nullable=True, + ) network_profile.network_api_version = AAZStrArg( options=["network-api-version"], help="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'", @@ -1106,6 +1147,25 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) + interconnect_group_profile = cls._args_schema.virtual_machine_profile.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectArg( + options=["interconnect-group"], + help="Reference to the interconnect group resource.", + nullable=True, + ) + cls._build_args_sub_resource_update(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListArg( + options=["subgroups"], + help="The list of subgroup references within the interconnect group.", + nullable=True, + ) + + subgroups = cls._args_schema.virtual_machine_profile.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_sub_resource_update(subgroups.Element) + network_interface_configurations = cls._args_schema.virtual_machine_profile.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectArg( nullable=True, @@ -1336,6 +1396,11 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _element = cls._args_schema.virtual_machine_profile.network_profile.network_interface_configurations.Element.ip_configurations.Element.public_ip_address_configuration.ip_tags.Element + _element.first_party_service_tag_id = AAZResourceIdArg( + options=["first-party-service-tag-id"], + help="The first party service tag resource identifier associated with the public IP address.", + nullable=True, + ) _element.ip_tag_type = AAZStrArg( options=["ip-tag-type"], help="IP tag type. Example: FirstPartyUsage.", @@ -1815,6 +1880,12 @@ def _build_arguments_schema(cls, *args, **kwargs): help="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](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", nullable=True, ) + storage_profile.disk_api_version = AAZStrArg( + options=["disk-api-version"], + help="Specifies the Disk API version used when applying additionalDiskProperties to managed disks. The value must be in the format YYYY-MM-DD (e.g., \"2026-03-02\").", + nullable=True, + enum={"2025-01-02": "2025-01-02", "2026-03-02": "2026-03-02"}, + ) storage_profile.disk_controller_type = AAZStrArg( options=["disk-controller-type"], help="Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01", @@ -2082,6 +2153,7 @@ def _build_args_host_endpoint_settings_update(cls, _schema): if cls._args_host_endpoint_settings_update is not None: _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_update.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_update.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_update.use_local_file_rules return cls._args_host_endpoint_settings_update = AAZObjectArg( @@ -2100,9 +2172,15 @@ def _build_args_host_endpoint_settings_update(cls, _schema): nullable=True, enum={"Audit": "Audit", "Disabled": "Disabled", "Enforce": "Enforce"}, ) + host_endpoint_settings_update.use_local_file_rules = AAZBoolArg( + options=["use-local-file-rules"], + help="When set to true, instructs the GuestProxyAgent inside the VM to load additional access control rules defined in a local file on the VM.", + nullable=True, + ) _schema.in_vm_access_control_profile_reference_id = cls._args_host_endpoint_settings_update.in_vm_access_control_profile_reference_id _schema.mode = cls._args_host_endpoint_settings_update.mode + _schema.use_local_file_rules = cls._args_host_endpoint_settings_update.use_local_file_rules _args_sub_resource_update = None @@ -2130,6 +2208,7 @@ def _build_args_sub_resource_update(cls, _schema): @classmethod def _build_args_virtual_machine_scale_set_managed_disk_parameters_update(cls, _schema): if cls._args_virtual_machine_scale_set_managed_disk_parameters_update is not None: + _schema.additional_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.additional_disk_properties _schema.disk_encryption_set = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.disk_encryption_set _schema.security_profile = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.security_profile _schema.storage_account_type = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.storage_account_type @@ -2140,6 +2219,11 @@ def _build_args_virtual_machine_scale_set_managed_disk_parameters_update(cls, _s ) virtual_machine_scale_set_managed_disk_parameters_update = cls._args_virtual_machine_scale_set_managed_disk_parameters_update + virtual_machine_scale_set_managed_disk_parameters_update.additional_disk_properties = AAZObjectArg( + options=["additional-disk-properties"], + help="Specifies additional properties for the managed disk that can be set at the time of implicit creation of the disk. This property is not captured for Restore Points.", + nullable=True, + ) virtual_machine_scale_set_managed_disk_parameters_update.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], help="Specifies the customer managed disk encryption set resource id for the managed disk.", @@ -2158,6 +2242,82 @@ def _build_args_virtual_machine_scale_set_managed_disk_parameters_update(cls, _s enum={"PremiumV2_LRS": "PremiumV2_LRS", "Premium_LRS": "Premium_LRS", "Premium_ZRS": "Premium_ZRS", "StandardSSD_LRS": "StandardSSD_LRS", "StandardSSD_ZRS": "StandardSSD_ZRS", "Standard_LRS": "Standard_LRS", "UltraSSD_LRS": "UltraSSD_LRS"}, ) + additional_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectArg( + options=["managed-disk-properties"], + help="Specifies the managed disk properties that can be set at the time of implicit creation of the disk.", + nullable=True, + ) + + managed_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectArg( + options=["availability-policy"], + help="In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.", + nullable=True, + ) + managed_disk_properties.bursting_enabled = AAZBoolArg( + options=["bursting-enabled"], + help="Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.", + nullable=True, + ) + managed_disk_properties.disk_access_id = AAZStrArg( + options=["disk-access-id"], + help="Azure resource Id of the DiskAccess resource for using private endpoints on disks.", + nullable=True, + ) + managed_disk_properties.disk_iops_read_only = AAZIntArg( + options=["disk-iops-read-only"], + help="The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.", + nullable=True, + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntArg( + options=["disk-m-bps-read-only"], + help="The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.", + nullable=True, + ) + managed_disk_properties.logical_sector_size = AAZIntArg( + options=["logical-sector-size"], + help="Logical sector size in bytes for Ultra Disks. Supported values are 512 and 4096. 4096 is the default.", + nullable=True, + ) + managed_disk_properties.max_shares = AAZIntArg( + options=["max-shares"], + help="The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. Applies to data disks only.", + nullable=True, + fmt=AAZIntArgFormat( + minimum=1, + ), + ) + managed_disk_properties.network_access_policy = AAZStrArg( + options=["network-access-policy"], + help="Policy for accessing the disk via network.", + nullable=True, + enum={"AllowAll": "AllowAll", "AllowPrivate": "AllowPrivate", "DenyAll": "DenyAll"}, + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolArg( + options=["optimized-for-frequent-attach"], + help="Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.", + nullable=True, + ) + managed_disk_properties.performance_plus = AAZBoolArg( + options=["performance-plus"], + help="Set this flag to true to get a boost on the performance target of the disk deployed. This flag can only be set on disk creation time and cannot be disabled after enabled.", + nullable=True, + ) + managed_disk_properties.tier = AAZStrArg( + options=["tier"], + help="Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.", + nullable=True, + ) + + availability_policy = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrArg( + options=["action-on-disk-delay"], + help="Determines how to handle disks with slow I/O.", + nullable=True, + enum={"AutomaticReattach": "AutomaticReattach", "None": "None"}, + ) + security_profile = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.security_profile security_profile.disk_encryption_set = AAZObjectArg( options=["disk-encryption-set"], @@ -2172,6 +2332,7 @@ def _build_args_virtual_machine_scale_set_managed_disk_parameters_update(cls, _s enum={"DiskWithVMGuestState": "DiskWithVMGuestState", "NonPersistedTPM": "NonPersistedTPM", "VMGuestStateOnly": "VMGuestStateOnly"}, ) + _schema.additional_disk_properties = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.additional_disk_properties _schema.disk_encryption_set = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.disk_encryption_set _schema.security_profile = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.security_profile _schema.storage_account_type = cls._args_virtual_machine_scale_set_managed_disk_parameters_update.storage_account_type @@ -2254,7 +2415,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -2353,7 +2514,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -2615,8 +2776,13 @@ def _update_instance(self, instance): sku_profile = _builder.get(".properties.skuProfile") if sku_profile is not None: sku_profile.set_prop("allocationStrategy", AAZStrType, ".allocation_strategy") + sku_profile.set_prop("automaticSkuMigrationPolicy", AAZObjectType, ".automatic_sku_migration_policy") sku_profile.set_prop("vmSizes", AAZListType, ".vm_sizes") + automatic_sku_migration_policy = _builder.get(".properties.skuProfile.automaticSkuMigrationPolicy") + if automatic_sku_migration_policy is not None: + automatic_sku_migration_policy.set_prop("enabled", AAZBoolType, ".enabled") + vm_sizes = _builder.get(".properties.skuProfile.vmSizes") if vm_sizes is not None: vm_sizes.set_elements(AAZObjectType, ".") @@ -2664,6 +2830,7 @@ def _update_instance(self, instance): virtual_machine_profile.set_prop("evictionPolicy", AAZStrType, ".eviction_policy") virtual_machine_profile.set_prop("extensionProfile", AAZObjectType, ".extension_profile") virtual_machine_profile.set_prop("hardwareProfile", AAZObjectType, ".hardware_profile") + virtual_machine_profile.set_prop("interconnectBlockProfile", AAZObjectType, ".interconnect_block_profile") virtual_machine_profile.set_prop("licenseType", AAZStrType, ".license_type") virtual_machine_profile.set_prop("networkProfile", AAZObjectType, ".network_profile") virtual_machine_profile.set_prop("osProfile", AAZObjectType, ".os_profile") @@ -2699,6 +2866,7 @@ def _update_instance(self, instance): capacity_reservation = _builder.get(".properties.virtualMachineProfile.capacityReservation") if capacity_reservation is not None: _UpdateHelper._build_schema_sub_resource_update(capacity_reservation.set_prop("capacityReservationGroup", AAZObjectType, ".capacity_reservation_group")) + capacity_reservation.set_prop("disableCapacityReservationAssignment", AAZBoolType, ".disable_capacity_reservation_assignment") diagnostics_profile = _builder.get(".properties.virtualMachineProfile.diagnosticsProfile") if diagnostics_profile is not None: @@ -2748,6 +2916,7 @@ def _update_instance(self, instance): hardware_profile = _builder.get(".properties.virtualMachineProfile.hardwareProfile") if hardware_profile is not None: + hardware_profile.set_prop("processorMode", AAZStrType, ".processor_mode") hardware_profile.set_prop("vmSizeProperties", AAZObjectType, ".vm_size_properties") vm_size_properties = _builder.get(".properties.virtualMachineProfile.hardwareProfile.vmSizeProperties") @@ -2755,12 +2924,26 @@ def _update_instance(self, instance): vm_size_properties.set_prop("vCPUsAvailable", AAZIntType, ".v_cp_us_available") vm_size_properties.set_prop("vCPUsPerCore", AAZIntType, ".v_cp_us_per_core") + interconnect_block_profile = _builder.get(".properties.virtualMachineProfile.interconnectBlockProfile") + if interconnect_block_profile is not None: + _UpdateHelper._build_schema_api_entity_reference_update(interconnect_block_profile.set_prop("interconnectBlock", AAZObjectType, ".interconnect_block")) + network_profile = _builder.get(".properties.virtualMachineProfile.networkProfile") if network_profile is not None: _UpdateHelper._build_schema_api_entity_reference_update(network_profile.set_prop("healthProbe", AAZObjectType, ".health_probe")) + network_profile.set_prop("interconnectGroupProfile", AAZObjectType, ".interconnect_group_profile") network_profile.set_prop("networkApiVersion", AAZStrType, ".network_api_version") network_profile.set_prop("networkInterfaceConfigurations", AAZListType, ".network_interface_configurations") + interconnect_group_profile = _builder.get(".properties.virtualMachineProfile.networkProfile.interconnectGroupProfile") + if interconnect_group_profile is not None: + _UpdateHelper._build_schema_sub_resource_update(interconnect_group_profile.set_prop("interconnectGroup", AAZObjectType, ".interconnect_group")) + interconnect_group_profile.set_prop("subgroups", AAZListType, ".subgroups") + + subgroups = _builder.get(".properties.virtualMachineProfile.networkProfile.interconnectGroupProfile.subgroups") + if subgroups is not None: + _UpdateHelper._build_schema_sub_resource_update(subgroups.set_elements(AAZObjectType, ".")) + network_interface_configurations = _builder.get(".properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations") if network_interface_configurations is not None: network_interface_configurations.set_elements(AAZObjectType, ".") @@ -2856,6 +3039,7 @@ def _update_instance(self, instance): _elements = _builder.get(".properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations[].properties.ipConfigurations[].properties.publicIPAddressConfiguration.properties.ipTags[]") if _elements is not None: + _elements.set_prop("firstPartyServiceTagId", AAZStrType, ".first_party_service_tag_id") _elements.set_prop("ipTagType", AAZStrType, ".ip_tag_type") _elements.set_prop("tag", AAZStrType, ".tag") @@ -3037,6 +3221,7 @@ def _update_instance(self, instance): storage_profile = _builder.get(".properties.virtualMachineProfile.storageProfile") if storage_profile is not None: storage_profile.set_prop("dataDisks", AAZListType, ".data_disks") + storage_profile.set_prop("diskApiVersion", AAZStrType, ".disk_api_version") storage_profile.set_prop("diskControllerType", AAZStrType, ".disk_controller_type") storage_profile.set_prop("imageReference", AAZObjectType, ".image_reference") storage_profile.set_prop("osDisk", AAZObjectType, ".os_disk") @@ -3144,6 +3329,7 @@ def _build_schema_host_endpoint_settings_update(cls, _builder): return _builder.set_prop("inVMAccessControlProfileReferenceId", AAZStrType, ".in_vm_access_control_profile_reference_id") _builder.set_prop("mode", AAZStrType, ".mode") + _builder.set_prop("useLocalFileRules", AAZBoolType, ".use_local_file_rules") @classmethod def _build_schema_sub_resource_update(cls, _builder): @@ -3155,10 +3341,33 @@ def _build_schema_sub_resource_update(cls, _builder): def _build_schema_virtual_machine_scale_set_managed_disk_parameters_update(cls, _builder): if _builder is None: return + _builder.set_prop("additionalDiskProperties", AAZObjectType, ".additional_disk_properties") cls._build_schema_disk_encryption_set_parameters_update(_builder.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) _builder.set_prop("securityProfile", AAZObjectType, ".security_profile") _builder.set_prop("storageAccountType", AAZStrType, ".storage_account_type") + additional_disk_properties = _builder.get(".additionalDiskProperties") + if additional_disk_properties is not None: + additional_disk_properties.set_prop("managedDiskProperties", AAZObjectType, ".managed_disk_properties") + + managed_disk_properties = _builder.get(".additionalDiskProperties.managedDiskProperties") + if managed_disk_properties is not None: + managed_disk_properties.set_prop("availabilityPolicy", AAZObjectType, ".availability_policy") + managed_disk_properties.set_prop("burstingEnabled", AAZBoolType, ".bursting_enabled") + managed_disk_properties.set_prop("diskAccessId", AAZStrType, ".disk_access_id") + managed_disk_properties.set_prop("diskIOPSReadOnly", AAZIntType, ".disk_iops_read_only") + managed_disk_properties.set_prop("diskMBpsReadOnly", AAZIntType, ".disk_m_bps_read_only") + managed_disk_properties.set_prop("logicalSectorSize", AAZIntType, ".logical_sector_size") + managed_disk_properties.set_prop("maxShares", AAZIntType, ".max_shares") + managed_disk_properties.set_prop("networkAccessPolicy", AAZStrType, ".network_access_policy") + managed_disk_properties.set_prop("optimizedForFrequentAttach", AAZBoolType, ".optimized_for_frequent_attach") + managed_disk_properties.set_prop("performancePlus", AAZBoolType, ".performance_plus") + managed_disk_properties.set_prop("tier", AAZStrType, ".tier") + + availability_policy = _builder.get(".additionalDiskProperties.managedDiskProperties.availabilityPolicy") + if availability_policy is not None: + availability_policy.set_prop("actionOnDiskDelay", AAZStrType, ".action_on_disk_delay") + security_profile = _builder.get(".securityProfile") if security_profile is not None: cls._build_schema_disk_encryption_set_parameters_update(security_profile.set_prop("diskEncryptionSet", AAZObjectType, ".disk_encryption_set")) @@ -3201,6 +3410,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -3210,9 +3420,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_sub_resource_read = None @@ -3234,6 +3448,7 @@ def _build_schema_sub_resource_read(cls, _schema): @classmethod def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _schema): if cls._schema_virtual_machine_scale_set_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type @@ -3242,6 +3457,9 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s cls._schema_virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read = AAZObjectType() virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read + virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -3253,6 +3471,49 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="storageAccountType", ) + additional_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -3262,6 +3523,7 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type @@ -3635,10 +3897,16 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): sku_profile.allocation_strategy = AAZStrType( serialized_name="allocationStrategy", ) + sku_profile.automatic_sku_migration_policy = AAZObjectType( + serialized_name="automaticSkuMigrationPolicy", + ) sku_profile.vm_sizes = AAZListType( serialized_name="vmSizes", ) + automatic_sku_migration_policy = _schema_virtual_machine_scale_set_read.properties.sku_profile.automatic_sku_migration_policy + automatic_sku_migration_policy.enabled = AAZBoolType() + vm_sizes = _schema_virtual_machine_scale_set_read.properties.sku_profile.vm_sizes vm_sizes.Element = AAZObjectType() @@ -3723,6 +3991,9 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): virtual_machine_profile.hardware_profile = AAZObjectType( serialized_name="hardwareProfile", ) + virtual_machine_profile.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) virtual_machine_profile.license_type = AAZStrType( serialized_name="licenseType", ) @@ -3791,6 +4062,9 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): serialized_name="capacityReservationGroup", ) cls._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -3872,6 +4146,9 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): provision_after_extensions.Element = AAZStrType() hardware_profile = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", ) @@ -3884,11 +4161,20 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): serialized_name="vCPUsPerCore", ) + interconnect_block_profile = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + cls._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.network_profile network_profile.health_probe = AAZObjectType( serialized_name="healthProbe", ) cls._build_schema_api_entity_reference_read(network_profile.health_probe) + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -3896,6 +4182,17 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): serialized_name="networkInterfaceConfigurations", ) + interconnect_group_profile = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + cls._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + cls._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -4045,6 +4342,9 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): ip_tags.Element = AAZObjectType() _element = _schema_virtual_machine_scale_set_read.properties.virtual_machine_profile.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -4319,6 +4619,9 @@ def _build_schema_virtual_machine_scale_set_read(cls, _schema): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) diff --git a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_wait.py b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_wait.py index e40783ae2e9..0caf3903f75 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_wait.py +++ b/src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2025-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2026-04-01"], ] } @@ -124,7 +124,7 @@ def query_parameters(self): "$expand", self.ctx.args.expand, ), **self.serialize_query_param( - "api-version", "2025-11-01", + "api-version", "2026-04-01", required=True, ), } @@ -502,10 +502,16 @@ def _build_schema_on_200(cls): sku_profile.allocation_strategy = AAZStrType( serialized_name="allocationStrategy", ) + sku_profile.automatic_sku_migration_policy = AAZObjectType( + serialized_name="automaticSkuMigrationPolicy", + ) sku_profile.vm_sizes = AAZListType( serialized_name="vmSizes", ) + automatic_sku_migration_policy = cls._schema_on_200.properties.sku_profile.automatic_sku_migration_policy + automatic_sku_migration_policy.enabled = AAZBoolType() + vm_sizes = cls._schema_on_200.properties.sku_profile.vm_sizes vm_sizes.Element = AAZObjectType() @@ -590,6 +596,9 @@ def _build_schema_on_200(cls): virtual_machine_profile.hardware_profile = AAZObjectType( serialized_name="hardwareProfile", ) + virtual_machine_profile.interconnect_block_profile = AAZObjectType( + serialized_name="interconnectBlockProfile", + ) virtual_machine_profile.license_type = AAZStrType( serialized_name="licenseType", ) @@ -658,6 +667,9 @@ def _build_schema_on_200(cls): serialized_name="capacityReservationGroup", ) _WaitHelper._build_schema_sub_resource_read(capacity_reservation.capacity_reservation_group) + capacity_reservation.disable_capacity_reservation_assignment = AAZBoolType( + serialized_name="disableCapacityReservationAssignment", + ) diagnostics_profile = cls._schema_on_200.properties.virtual_machine_profile.diagnostics_profile diagnostics_profile.boot_diagnostics = AAZObjectType( @@ -739,6 +751,9 @@ def _build_schema_on_200(cls): provision_after_extensions.Element = AAZStrType() hardware_profile = cls._schema_on_200.properties.virtual_machine_profile.hardware_profile + hardware_profile.processor_mode = AAZStrType( + serialized_name="processorMode", + ) hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", ) @@ -751,11 +766,20 @@ def _build_schema_on_200(cls): serialized_name="vCPUsPerCore", ) + interconnect_block_profile = cls._schema_on_200.properties.virtual_machine_profile.interconnect_block_profile + interconnect_block_profile.interconnect_block = AAZObjectType( + serialized_name="interconnectBlock", + ) + _WaitHelper._build_schema_api_entity_reference_read(interconnect_block_profile.interconnect_block) + network_profile = cls._schema_on_200.properties.virtual_machine_profile.network_profile network_profile.health_probe = AAZObjectType( serialized_name="healthProbe", ) _WaitHelper._build_schema_api_entity_reference_read(network_profile.health_probe) + network_profile.interconnect_group_profile = AAZObjectType( + serialized_name="interconnectGroupProfile", + ) network_profile.network_api_version = AAZStrType( serialized_name="networkApiVersion", ) @@ -763,6 +787,17 @@ def _build_schema_on_200(cls): serialized_name="networkInterfaceConfigurations", ) + interconnect_group_profile = cls._schema_on_200.properties.virtual_machine_profile.network_profile.interconnect_group_profile + interconnect_group_profile.interconnect_group = AAZObjectType( + serialized_name="interconnectGroup", + ) + _WaitHelper._build_schema_sub_resource_read(interconnect_group_profile.interconnect_group) + interconnect_group_profile.subgroups = AAZListType() + + subgroups = cls._schema_on_200.properties.virtual_machine_profile.network_profile.interconnect_group_profile.subgroups + subgroups.Element = AAZObjectType() + _WaitHelper._build_schema_sub_resource_read(subgroups.Element) + network_interface_configurations = cls._schema_on_200.properties.virtual_machine_profile.network_profile.network_interface_configurations network_interface_configurations.Element = AAZObjectType() @@ -912,6 +947,9 @@ def _build_schema_on_200(cls): ip_tags.Element = AAZObjectType() _element = cls._schema_on_200.properties.virtual_machine_profile.network_profile.network_interface_configurations.Element.properties.ip_configurations.Element.properties.public_ip_address_configuration.properties.ip_tags.Element + _element.first_party_service_tag_id = AAZStrType( + serialized_name="firstPartyServiceTagId", + ) _element.ip_tag_type = AAZStrType( serialized_name="ipTagType", ) @@ -1186,6 +1224,9 @@ def _build_schema_on_200(cls): storage_profile.data_disks = AAZListType( serialized_name="dataDisks", ) + storage_profile.disk_api_version = AAZStrType( + serialized_name="diskApiVersion", + ) storage_profile.disk_controller_type = AAZStrType( serialized_name="diskControllerType", ) @@ -1370,6 +1411,7 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): if cls._schema_host_endpoint_settings_read is not None: _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules return cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType() @@ -1379,9 +1421,13 @@ def _build_schema_host_endpoint_settings_read(cls, _schema): serialized_name="inVMAccessControlProfileReferenceId", ) host_endpoint_settings_read.mode = AAZStrType() + host_endpoint_settings_read.use_local_file_rules = AAZBoolType( + serialized_name="useLocalFileRules", + ) _schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id _schema.mode = cls._schema_host_endpoint_settings_read.mode + _schema.use_local_file_rules = cls._schema_host_endpoint_settings_read.use_local_file_rules _schema_sub_resource_read = None @@ -1403,6 +1449,7 @@ def _build_schema_sub_resource_read(cls, _schema): @classmethod def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _schema): if cls._schema_virtual_machine_scale_set_managed_disk_parameters_read is not None: + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type @@ -1411,6 +1458,9 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s cls._schema_virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read = AAZObjectType() virtual_machine_scale_set_managed_disk_parameters_read = _schema_virtual_machine_scale_set_managed_disk_parameters_read + virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties = AAZObjectType( + serialized_name="additionalDiskProperties", + ) virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", ) @@ -1422,6 +1472,49 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="storageAccountType", ) + additional_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties + additional_disk_properties.managed_disk_properties = AAZObjectType( + serialized_name="managedDiskProperties", + ) + + managed_disk_properties = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties + managed_disk_properties.availability_policy = AAZObjectType( + serialized_name="availabilityPolicy", + ) + managed_disk_properties.bursting_enabled = AAZBoolType( + serialized_name="burstingEnabled", + ) + managed_disk_properties.disk_access_id = AAZStrType( + serialized_name="diskAccessId", + ) + managed_disk_properties.disk_iops_read_only = AAZIntType( + serialized_name="diskIOPSReadOnly", + ) + managed_disk_properties.disk_m_bps_read_only = AAZIntType( + serialized_name="diskMBpsReadOnly", + ) + managed_disk_properties.logical_sector_size = AAZIntType( + serialized_name="logicalSectorSize", + ) + managed_disk_properties.max_shares = AAZIntType( + serialized_name="maxShares", + ) + managed_disk_properties.network_access_policy = AAZStrType( + serialized_name="networkAccessPolicy", + ) + managed_disk_properties.optimized_for_frequent_attach = AAZBoolType( + serialized_name="optimizedForFrequentAttach", + ) + managed_disk_properties.performance_plus = AAZBoolType( + serialized_name="performancePlus", + ) + managed_disk_properties.tier = AAZStrType() + + availability_policy = _schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties.managed_disk_properties.availability_policy + availability_policy.action_on_disk_delay = AAZStrType( + serialized_name="actionOnDiskDelay", + ) + security_profile = _schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile security_profile.disk_encryption_set = AAZObjectType( serialized_name="diskEncryptionSet", @@ -1431,6 +1524,7 @@ def _build_schema_virtual_machine_scale_set_managed_disk_parameters_read(cls, _s serialized_name="securityEncryptionType", ) + _schema.additional_disk_properties = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.additional_disk_properties _schema.disk_encryption_set = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.disk_encryption_set _schema.security_profile = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.security_profile _schema.storage_account_type = cls._schema_virtual_machine_scale_set_managed_disk_parameters_read.storage_account_type From 02af4767b576183cce59149fc89fee1f7eb7f923 Mon Sep 17 00:00:00 2001 From: william Date: Thu, 13 Aug 2026 09:48:18 +0800 Subject: [PATCH 2/4] Developed for vm & vmss --processor_mode --- .../azure/cli/command_modules/vm/_params.py | 5 ++++ .../command_modules/vm/_template_builder.py | 12 +++++++--- .../azure/cli/command_modules/vm/custom.py | 24 +++++++++++++++---- .../cli/command_modules/vm/operations/vm.py | 3 +++ .../cli/command_modules/vm/operations/vmss.py | 3 +++ 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_params.py b/src/azure-cli/azure/cli/command_modules/vm/_params.py index 6729b8cb4fe..b4cc6de5e41 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -71,6 +71,7 @@ def load_arguments(self, _): OSTypes = ['Windows', 'Linux'] PatchMode = ['AutomaticByOS', 'AutomaticByPlatform', 'Manual', 'ImageDefault'] Priority = ['Regular', 'Low', 'Spot'] + ProcessorMode = ['Deterministic', 'Opportunistic'] ProxyAgentMode = ['Audit', 'Enforce'] PublicIPAddressAllocationMethod = ['dynamic', 'static'] PublicNetworkAccess = ['Disabled', 'Enabled'] @@ -1370,6 +1371,10 @@ def load_arguments(self, _): help='The ID or name of the capacity reservation group that is used to allocate. Pass in "None" to disassociate the capacity reservation group. Please note that if you want to delete a VM/VMSS that has been associated with capacity reservation group, you need to disassociate the capacity reservation group first.') c.argument('v_cpus_available', type=int, help='Specify the number of vCPUs available') c.argument('v_cpus_per_core', type=int, help='Specify the ratio of vCPU to physical core. Setting this property to 1 also means that hyper-threading is disabled.') + c.argument('processor_mode', arg_type=get_enum_type(ProcessorMode), + help='Specifies the processor mode for the virtual machine or virtual machine scale set. ' + 'Optional; if omitted, the platform default applies (currently Deterministic). ' + 'This property can be updated on a running VM or VMSS without deallocation or reboot.') c.argument('disk_controller_type', disk_controller_type) c.argument('enable_proxy_agent', arg_type=get_three_state_flag(), help='Specify whether metadata security protoco (proxy agent) feature should be enabled on the virtual machine or virtual machine scale set.') c.argument('proxy_agent_mode', deprecate_info=c.deprecate(target='--proxy-agent-mode', redirect='--wire-server-mode'), arg_type=get_enum_type(ProxyAgentMode), help='Specify the mode that proxy agent will execute on if the feature is enabled.') diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index 07d46cb8853..25f2fd06877 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -306,6 +306,7 @@ def build_vm_resource( # pylint: disable=too-many-locals, too-many-statements, enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, os_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, + processor_mode=None, os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None, disk_controller_type=None, enable_proxy_agent=None, proxy_agent_mode=None, additional_scheduled_events=None, enable_user_reboot_scheduled_events=None, enable_user_redeploy_scheduled_events=None, @@ -588,6 +589,8 @@ def _build_storage_profile(): vm_properties = {'hardwareProfile': {'vmSize': size}, 'networkProfile': {'networkInterfaces': nics}, 'storageProfile': _build_storage_profile()} + if processor_mode is not None: + vm_properties['hardwareProfile']['processorMode'] = processor_mode resiliency_profile = {} if zone_movement is not None: @@ -757,7 +760,7 @@ def _build_storage_profile(): } vm = { - 'apiVersion': '2025-11-01', + 'apiVersion': '2026-04-01', 'type': 'Microsoft.Compute/virtualMachines', 'name': name, 'location': location, @@ -1059,7 +1062,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, - v_cpus_per_core=None, os_disk_security_encryption_type=None, + v_cpus_per_core=None, processor_mode=None, os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None, os_disk_delete_option=None, regular_priority_count=None, regular_priority_percentage=None, disk_controller_type=None, enable_osimage_notification=None, max_surge=None, enable_hibernation=None, @@ -1370,6 +1373,9 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro virtual_machine_profile['storageProfile'] = storage_properties hardware_profile = {} + if processor_mode is not None: + hardware_profile['processorMode'] = processor_mode + vm_size_properties = {} if v_cpus_available is not None: vm_size_properties['vCPUsAvailable'] = v_cpus_available @@ -1737,7 +1743,7 @@ def build_vmss_resource(cmd, name, computer_name_prefix, location, tags, overpro 'name': name, 'location': location, 'tags': tags, - 'apiVersion': '2025-11-01', + 'apiVersion': '2026-04-01', 'dependsOn': [], 'properties': vmss_properties } diff --git a/src/azure-cli/azure/cli/command_modules/vm/custom.py b/src/azure-cli/azure/cli/command_modules/vm/custom.py index b1b55aab17d..519b31295e6 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -913,7 +913,7 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_D2s_ enable_hotpatching=None, platform_fault_domain=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, count=None, edge_zone=None, nic_delete_option=None, os_disk_delete_option=None, data_disk_delete_option=None, user_data=None, capacity_reservation_group=None, enable_hibernation=None, - v_cpus_available=None, v_cpus_per_core=None, accept_term=None, + v_cpus_available=None, v_cpus_per_core=None, processor_mode=None, accept_term=None, disable_integrity_monitoring=None, # Unused enable_integrity_monitoring=False, os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None, @@ -1144,6 +1144,7 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_D2s_ enable_vtpm=enable_vtpm, count=count, edge_zone=edge_zone, os_disk_delete_option=os_disk_delete_option, user_data=user_data, capacity_reservation_group=capacity_reservation_group, enable_hibernation=enable_hibernation, v_cpus_available=v_cpus_available, v_cpus_per_core=v_cpus_per_core, + processor_mode=processor_mode, os_disk_security_encryption_type=os_disk_security_encryption_type, os_disk_secure_vm_disk_encryption_set=os_disk_secure_vm_disk_encryption_set, disk_controller_type=disk_controller_type, enable_proxy_agent=enable_proxy_agent, @@ -1757,7 +1758,8 @@ def update_vm(cmd, resource_group_name, vm_name, os_disk=None, disk_caching=None priority=None, max_price=None, proximity_placement_group=None, workspace=None, enable_secure_boot=None, enable_vtpm=None, user_data=None, capacity_reservation_group=None, dedicated_host=None, dedicated_host_group=None, size=None, ephemeral_os_disk_placement=None, - enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, disk_controller_type=None, + enable_hibernation=None, v_cpus_available=None, v_cpus_per_core=None, processor_mode=None, + disk_controller_type=None, security_type=None, enable_proxy_agent=None, proxy_agent_mode=None, additional_scheduled_events=None, enable_user_reboot_scheduled_events=None, enable_user_redeploy_scheduled_events=None, scheduled_events_api_version=None, enable_all_instance_down=None, @@ -1988,6 +1990,11 @@ def _output(self, *args, **kwargs): vm["hardware_profile"]["vm_size_properties"] = {} vm["hardware_profile"]["vm_size_properties"]["v_cp_us_per_core"] = v_cpus_per_core + if processor_mode is not None: + if vm.get("hardware_profile", None) is None: + vm["hardware_profile"] = {} + vm["hardware_profile"]["processor_mode"] = processor_mode + if ephemeral_os_disk_placement is not None: if vm.get("storage_profile", {}).get("os_disk", {}).get("diff_disk_settings", None) is not None: vm["storage_profile"]["os_disk"]["diff_disk_settings"]["placement"] = ephemeral_os_disk_placement @@ -3717,7 +3724,7 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, user_data=None, network_api_version=None, enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, enable_auto_update=None, patch_mode=None, enable_agent=None, security_type=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, - v_cpus_available=None, v_cpus_per_core=None, accept_term=None, + v_cpus_available=None, v_cpus_per_core=None, processor_mode=None, accept_term=None, disable_integrity_monitoring=None, # Unused enable_integrity_monitoring=False, enable_auto_os_upgrade=None, os_disk_security_encryption_type=None, os_disk_secure_vm_disk_encryption_set=None, @@ -4035,7 +4042,8 @@ def _get_public_ip_address_allocation(value, sku): patch_mode=patch_mode, enable_agent=enable_agent, security_type=security_type, enable_secure_boot=enable_secure_boot, enable_vtpm=enable_vtpm, automatic_repairs_action=automatic_repairs_action, v_cpus_available=v_cpus_available, - v_cpus_per_core=v_cpus_per_core, os_disk_security_encryption_type=os_disk_security_encryption_type, + v_cpus_per_core=v_cpus_per_core, processor_mode=processor_mode, + os_disk_security_encryption_type=os_disk_security_encryption_type, os_disk_secure_vm_disk_encryption_set=os_disk_secure_vm_disk_encryption_set, os_disk_delete_option=os_disk_delete_option, regular_priority_count=regular_priority_count, regular_priority_percentage=regular_priority_percentage, disk_controller_type=disk_controller_type, @@ -4581,6 +4589,7 @@ def update_vmss(cmd, resource_group_name, name, license_type=None, no_wait=False user_data=None, enable_spot_restore=None, spot_restore_timeout=None, capacity_reservation_group=None, vm_sku=None, ephemeral_os_disk_placement=None, force_deletion=None, enable_secure_boot=None, enable_vtpm=None, automatic_repairs_action=None, v_cpus_available=None, v_cpus_per_core=None, + processor_mode=None, regular_priority_count=None, regular_priority_percentage=None, disk_controller_type=None, enable_osimage_notification=None, custom_data=None, enable_hibernation=None, security_type=None, enable_proxy_agent=None, proxy_agent_mode=None, @@ -4706,6 +4715,13 @@ def _output(self, *args, **kwargs): if v_cpus_per_core is not None: vmss["virtual_machine_profile"]["hardware_profile"]["vm_size_properties"]["v_cp_us_per_core"] = v_cpus_per_core # pylint: disable=line-too-long + if processor_mode is not None: + if vmss.get("virtual_machine_profile", None) is None: + vmss["virtual_machine_profile"] = {} + if vmss["virtual_machine_profile"].get("hardware_profile", None) is None: + vmss["virtual_machine_profile"]["hardware_profile"] = {} + vmss["virtual_machine_profile"]["hardware_profile"]["processor_mode"] = processor_mode + if capacity_reservation_group is not None: if vmss.get("virtual_machine_profile", None) is None: vmss["virtual_machine_profile"] = {} diff --git a/src/azure-cli/azure/cli/command_modules/vm/operations/vm.py b/src/azure-cli/azure/cli/command_modules/vm/operations/vm.py index 3d645cda194..e084a1e5b22 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/operations/vm.py +++ b/src/azure-cli/azure/cli/command_modules/vm/operations/vm.py @@ -414,6 +414,9 @@ def convert_show_result_to_snake_case(result): boot_diagnostics.pop("storageUri") hardware_profile = new_result.get("hardware_profile", {}) or {} + if "processorMode" in hardware_profile: + hardware_profile["processor_mode"] = hardware_profile["processorMode"] + hardware_profile.pop("processorMode") if "vmSize" in hardware_profile: hardware_profile["vm_size"] = hardware_profile["vmSize"] hardware_profile.pop("vmSize") diff --git a/src/azure-cli/azure/cli/command_modules/vm/operations/vmss.py b/src/azure-cli/azure/cli/command_modules/vm/operations/vmss.py index da5c8c27861..6521800777a 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/operations/vmss.py +++ b/src/azure-cli/azure/cli/command_modules/vm/operations/vmss.py @@ -580,6 +580,9 @@ def convert_show_result_to_snake_case(result): protected_settings_from_key_vault.pop("sourceVault") hardware_profile = virtual_machine_profile.get("hardware_profile", {}) or {} + if "processorMode" in hardware_profile: + hardware_profile["processor_mode"] = hardware_profile["processorMode"] + hardware_profile.pop("processorMode") if "vmSizeProperties" in hardware_profile: hardware_profile["vm_size_properties"] = hardware_profile["vmSizeProperties"] hardware_profile.pop("vmSizeProperties") From f7f66127f03d02f72b432244be992a71b764f800 Mon Sep 17 00:00:00 2001 From: william Date: Thu, 13 Aug 2026 10:58:28 +0800 Subject: [PATCH 3/4] Add test case --- .../vm/tests/latest/test_vm_commands.py | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py index c7a8f79cf9b..a03b9ac78a1 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py @@ -2027,6 +2027,50 @@ def test_vm_size_properties(self, resource_group): self.check('virtualMachineProfile.hardwareProfile.vmSizeProperties.vCpusPerCore', 2) ]) + @AllowLargeResponse(size_kb=99999) + @ResourceGroupPreparer(name_prefix='cli_test_vm_processor_mode_', location='westus') + def test_vm_processor_mode(self, resource_group): + self.kwargs.update({ + 'vm': self.create_random_name('vm-', 10), + 'vmss': self.create_random_name('vmss-', 12), + 'image': 'MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest', + 'size': 'Standard_D2als_v7' + }) + + self.cmd( + 'vm create -g {rg} -n {vm} --image {image} --size {size} ' + '--admin-username azureuser --admin-password TestPassword0! ' + '--processor-mode Deterministic --public-ip-address "" --nsg-rule NONE', + checks=[ + self.check('hardwareProfile.processorMode', 'Deterministic') + ]) + self.cmd('vm show -g {rg} -n {vm}', checks=[ + self.check('hardwareProfile.processorMode', 'Deterministic') + ]) + self.cmd('vm update -g {rg} -n {vm} --processor-mode Opportunistic', checks=[ + self.check('hardwareProfile.processorMode', 'Opportunistic') + ]) + self.cmd('vm show -g {rg} -n {vm}', checks=[ + self.check('hardwareProfile.processorMode', 'Opportunistic') + ]) + + self.cmd( + 'vmss create -g {rg} -n {vmss} --image {image} --vm-sku {size} ' + '--admin-username azureuser --admin-password TestPassword0! ' + '--processor-mode Deterministic --instance-count 0 --lb-sku Standard', + checks=[ + self.check('virtualMachineProfile.hardwareProfile.processorMode', 'Deterministic') + ]) + self.cmd('vmss show -g {rg} -n {vmss}', checks=[ + self.check('virtualMachineProfile.hardwareProfile.processorMode', 'Deterministic') + ]) + self.cmd('vmss update -g {rg} -n {vmss} --processor-mode Opportunistic', checks=[ + self.check('virtualMachineProfile.hardwareProfile.processorMode', 'Opportunistic') + ]) + self.cmd('vmss show -g {rg} -n {vmss}', checks=[ + self.check('virtualMachineProfile.hardwareProfile.processorMode', 'Opportunistic') + ]) + class VMSimulateEvictionScenarioTest(ScenarioTest): From 35380c0582f6c3876e2ab391ac983a41eebead17 Mon Sep 17 00:00:00 2001 From: william Date: Wed, 26 Aug 2026 07:19:20 +0800 Subject: [PATCH 4/4] Update test case --- .../cli/command_modules/vm/tests/latest/test_vm_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py index f416657ebda..6f1aae6a8e0 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py @@ -2027,6 +2027,7 @@ def test_vm_size_properties(self, resource_group): self.check('virtualMachineProfile.hardwareProfile.vmSizeProperties.vCpusPerCore', 2) ]) + @live_only() @AllowLargeResponse(size_kb=99999) @ResourceGroupPreparer(name_prefix='cli_test_vm_processor_mode_', location='westus') def test_vm_processor_mode(self, resource_group):