diff --git a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_create.py b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_create.py index 36cfcdbfc34..a032ab4fdfc 100644 --- a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_create.py +++ b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_create.py @@ -18,16 +18,14 @@ class Create(AAZCommand): """Create an Azure Compute Fleet - Create an Azure Compute Fleet - :example: Fleets_CreateOrUpdate az azure-fleet create --resource-group rgazurefleet --fleet-name testFleet --spot-priority-profile "{capacity:20,min-capacity:10,max-price-per-vm:0.00865,eviction-policy:Delete,allocation-strategy:PriceCapacityOptimized,maintain:True}" --regular-priority-profile "{capacity:20,min-capacity:10,allocation-strategy:LowestPrice}" --vm-sizes-profile "[{name:Standard_d1_v2,rank:19225}]" --compute-profile "{base-virtual-machine-profile:{osProfile:{computerNamePrefix:o,adminUsername:nrgzqciiaaxjrqldbmjbqkyhntp,adminPassword:adfbrdxpv,customData:xjjib,windowsConfiguration:{provisionVMAgent:True,enableAutomaticUpdates:True,timeZone:hlyjiqcfksgrpjrct,additionalUnattendContent:[{passName:OobeSystem,componentName:Microsoft-Windows-Shell-Setup,settingName:AutoLogon,content:bubmqbxjkj}],patchSettings:{patchMode:Manual,enableHotpatching:True,assessmentMode:ImageDefault,automaticByPlatformSettings:{rebootSetting:Unknown,bypassPlatformSafetyChecksOnUserSchedule:True}},winRM:{listeners:[{protocol:Https,certificateUrl:'https://myVaultName.vault.azure.net/secrets/myCertName'}]},enableVMAgentPlatformUpdates:True},linuxConfiguration:{disablePasswordAuthentication:True,ssh:{publicKeys:[{path:kmqz,keyData:kivgsubusvpprwqaqpjcmhsv}]},provisionVMAgent:True,patchSettings:{patchMode:ImageDefault,assessmentMode:ImageDefault,automaticByPlatformSettings:{rebootSetting:Unknown,bypassPlatformSafetyChecksOnUserSchedule:True}},enableVMAgentPlatformUpdates:True},secrets:[{sourceVault:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'},vaultCertificates:[{certificateUrl:'https://myVaultName.vault.azure.net/secrets/myCertName',certificateStore:nlxrwavpzhueffxsshlun}]}],allowExtensionOperations:True,requireGuestProvisionSignal:True},storageProfile:{imageReference:{publisher:mqxgwbiyjzmxavhbkd,offer:isxgumkarlkomp,sku:eojmppqcrnpmxirtp,version:wvpcqefgtmqdgltiuz,sharedGalleryImageId:kmkgihoxwlawuuhcinfirktdwkmx,communityGalleryImageId:vlqe,id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}'},osDisk:{name:wfttw,caching:None,writeAcceleratorEnabled:True,createOption:FromImage,diffDiskSettings:{option:Local,placement:CacheDisk},diskSizeGB:14,osType:Windows,image:{uri:'https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd'},vhdContainers:[tkzcwddtinkfpnfklatw],managedDisk:{storageAccountType:Standard_LRS,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'},securityProfile:{securityEncryptionType:VMGuestStateOnly,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'}}},deleteOption:Delete},dataDisks:[{name:eogiykmdmeikswxmigjws,lun:14,caching:None,writeAcceleratorEnabled:True,createOption:FromImage,diskSizeGB:6,managedDisk:{storageAccountType:Standard_LRS,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'},securityProfile:{securityEncryptionType:VMGuestStateOnly,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'}}},diskIOPSReadWrite:27,diskMBpsReadWrite:2,deleteOption:Delete}],diskControllerType:uzb},networkProfile:{healthProbe:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'},networkInterfaceConfigurations:[{name:i,properties:{primary:True,enableAcceleratedNetworking:True,disableTcpStateTracking:True,enableFpga:True,networkSecurityGroup:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'},dnsSettings:{dnsServers:[nxmmfolhclsesu]},ipConfigurations:[{name:oezqhkidfhyywlfzwuotilrpbqnjg,properties:{subnet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'},primary:True,publicIPAddressConfiguration:{name:fvpqf,properties:{idleTimeoutInMinutes:9,dnsSettings:{domainNameLabel:ukrddzvmorpmfsczjwtbvp,domainNameLabelScope:TenantReuse},ipTags:[{ipTagType:sddgsoemnzgqizale,tag:wufmhrjsakbiaetyara}],publicIPPrefix:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}'},publicIPAddressVersion:IPv4,deleteOption:Delete},sku:{name:Basic,tier:Regional}},privateIPAddressVersion:IPv4,applicationGatewayBackendAddressPools:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'}],applicationSecurityGroups:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'}],loadBalancerBackendAddressPools:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'}],loadBalancerInboundNatPools:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'}]}}],enableIPForwarding:True,deleteOption:Delete,auxiliaryMode:None,auxiliarySku:None}}],networkApiVersion:2020-11-01},securityProfile:{uefiSettings:{secureBootEnabled:True,vTpmEnabled:True},encryptionAtHost:True,securityType:TrustedLaunch,encryptionIdentity:{userAssignedIdentityResourceId:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}'},proxyAgentSettings:{enabled:True,mode:Audit,keyIncarnationId:20}},diagnosticsProfile:{bootDiagnostics:{enabled:True,storageUri:'http://myStorageAccountName.blob.core.windows.net'}},extensionProfile:{extensions:[{name:bndxuxx,properties:{forceUpdateTag:yhgxw,publisher:kpxtirxjfprhs,type:pgjilctjjwaa,typeHandlerVersion:zevivcoilxmbwlrihhhibq,autoUpgradeMinorVersion:True,enableAutomaticUpgrade:True,settings:{},protectedSettings:{},provisionAfterExtensions:[nftzosroolbcwmpupujzqwqe],suppressFailures:True,protectedSettingsFromKeyVault:{secretUrl:'https://myvaultName.vault.azure.net/secrets/secret/mySecretName',sourceVault:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'}}}}],extensionsTimeBudget:mbhjahtdygwgyszdwjtvlvtgchdwil},licenseType:v,scheduledEventsProfile:{terminateNotificationProfile:{notBeforeTimeout:iljppmmw,enable:True},osImageNotificationProfile:{notBeforeTimeout:olbpadmevekyczfokodtfprxti,enable:True}},userData:s,capacityReservation:{capacityReservationGroup:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}'}},applicationProfile:{galleryApplications:[{tags:eyrqjbib,order:5,packageReferenceId:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}',configurationReference:ulztmiavpojpbpbddgnuuiimxcpau,treatFailureAsDeploymentFailure:True,enableAutomaticUpgrade:True}]},hardwareProfile:{vmSizeProperties:{vCPUsAvailable:16,vCPUsPerCore:23}},serviceArtifactReference:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}'},securityPostureReference:{id:'/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest',excludeExtensions:['{securityPostureVMExtensionName}'],isOverridable:True}},compute-api-version:2023-07-01,platform-fault-domain-count:1}" --zones "[zone1,zone2]" --identity "{type:UserAssigned,user-assigned-identities:{key9851:{}}}" --tags "{key3518:luvrnuvsgdpbuofdskkcoqhfh}" --location westus --plan "{name:jwgrcrnrtfoxn,publisher:iozjbiqqckqm,product:cgopbyvdyqikahwyxfpzwaqk,promotion-code:naglezezplcaruqogtxnuizslqnnbr,version:wa}" """ _aaz_info = { - "version": "2024-11-01", + "version": "2026-04-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2024-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2026-04-01-preview"], ] } @@ -73,6 +71,12 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="Compute Profile to use for running user's workloads.", ) + _args_schema.mode = AAZStrArg( + options=["--mode"], + arg_group="Properties", + help="Mode of the Fleet.", + enum={"Launch": "Launch", "Managed": "Managed"}, + ) _args_schema.regular_priority_profile = AAZObjectArg( options=["--rpp", "--regular-priority-profile"], arg_group="Properties", @@ -88,6 +92,14 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="Attribute based Fleet.", ) + _args_schema.vm_name_prefix = AAZStrArg( + options=["--vm-name-prefix"], + arg_group="Properties", + help="VirtualMachine prefix to be used for the virtual machines launched by Fleet. Can be used only with Launch mode.", + fmt=AAZStrArgFormat( + pattern="^[^_\\W][\\w\\-._]{0,64}(?
**Minimum-length (Windows):** 8 characters

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

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

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

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

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)", - blank=AAZPromptPasswordInput( - msg="VM Admin Password", - confirm=True), + prompt={"cls": "AAZPromptPasswordInput", "kwargs": {"msg": "Please provide VMSS password:", "confirm": True}}, ) os_profile.admin_username = AAZStrArg( options=["admin-username"], @@ -925,9 +941,7 @@ def _build_args_base_virtual_machine_profile_create(cls, _schema): os_profile.custom_data = AAZPasswordArg( options=["custom-data"], help="Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)", - blank=AAZPromptPasswordInput( - msg="VM Admin Password", - confirm=True), + prompt={"cls": "AAZPromptPasswordInput", "kwargs": {"msg": "Please enter VM Password:", "confirm": True}}, ) os_profile.linux_configuration = AAZObjectArg( options=["linux-configuration"], @@ -1083,9 +1097,7 @@ def _build_args_base_virtual_machine_profile_create(cls, _schema): _element.content = AAZPasswordArg( options=["content"], help="Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.", - blank=AAZPromptPasswordInput( - msg="VM Admin Password", - confirm=True), + prompt={"cls": "AAZPromptPasswordInput", "kwargs": {"msg": "Password:"}}, ) _element.pass_name = AAZStrArg( options=["pass-name"], @@ -1665,7 +1677,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } @@ -1718,9 +1730,11 @@ def content(self): if properties is not None: properties.set_prop("additionalLocationsProfile", AAZObjectType, ".additional_locations_profile") properties.set_prop("computeProfile", AAZObjectType, ".compute_profile", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("mode", AAZStrType, ".mode") properties.set_prop("regularPriorityProfile", AAZObjectType, ".regular_priority_profile") properties.set_prop("spotPriorityProfile", AAZObjectType, ".spot_priority_profile") properties.set_prop("vmAttributes", AAZObjectType, ".vm_attributes") + properties.set_prop("vmNamePrefix", AAZStrType, ".vm_name_prefix") properties.set_prop("vmSizesProfile", AAZListType, ".vm_sizes_profile", typ_kwargs={"flags": {"required": True}}) additional_locations_profile = _builder.get(".properties.additionalLocationsProfile") @@ -1925,10 +1939,14 @@ def _build_schema_on_200_201(cls): properties.additional_locations_profile = AAZObjectType( serialized_name="additionalLocationsProfile", ) + properties.capacity_type = AAZStrType( + serialized_name="capacityType", + ) properties.compute_profile = AAZObjectType( serialized_name="computeProfile", flags={"required": True}, ) + properties.mode = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -1950,10 +1968,16 @@ def _build_schema_on_200_201(cls): properties.vm_attributes = AAZObjectType( serialized_name="vmAttributes", ) + properties.vm_name_prefix = AAZStrType( + serialized_name="vmNamePrefix", + ) properties.vm_sizes_profile = AAZListType( serialized_name="vmSizesProfile", flags={"required": True}, ) + properties.zone_allocation_policy = AAZObjectType( + serialized_name="zoneAllocationPolicy", + ) additional_locations_profile = cls._schema_on_200_201.properties.additional_locations_profile additional_locations_profile.location_profiles = AAZListType( @@ -2125,6 +2149,24 @@ def _build_schema_on_200_201(cls): ) _element.rank = AAZIntType() + zone_allocation_policy = cls._schema_on_200_201.properties.zone_allocation_policy + zone_allocation_policy.distribution_strategy = AAZStrType( + serialized_name="distributionStrategy", + flags={"required": True}, + ) + zone_allocation_policy.zone_preferences = AAZListType( + serialized_name="zonePreferences", + ) + + zone_preferences = cls._schema_on_200_201.properties.zone_allocation_policy.zone_preferences + zone_preferences.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.zone_allocation_policy.zone_preferences.Element + _element.rank = AAZIntType() + _element.zone = AAZStrType( + flags={"required": True}, + ) + system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", @@ -2231,18 +2273,18 @@ def _build_schema_base_virtual_machine_profile_create(cls, _builder): properties.set_prop("autoUpgradeMinorVersion", AAZBoolType, ".auto_upgrade_minor_version") properties.set_prop("enableAutomaticUpgrade", AAZBoolType, ".enable_automatic_upgrade") properties.set_prop("forceUpdateTag", AAZStrType, ".force_update_tag") - properties.set_prop("protectedSettings", AAZFreeFormDictType, ".protected_settings", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("protectedSettings", AAZDictType, ".protected_settings", typ_kwargs={"flags": {"secret": True}}) properties.set_prop("protectedSettingsFromKeyVault", AAZObjectType, ".protected_settings_from_key_vault") properties.set_prop("provisionAfterExtensions", AAZListType, ".provision_after_extensions") properties.set_prop("publisher", AAZStrType, ".publisher") - properties.set_prop("settings", AAZFreeFormDictType, ".settings") + properties.set_prop("settings", AAZDictType, ".settings") properties.set_prop("suppressFailures", AAZBoolType, ".suppress_failures") properties.set_prop("type", AAZStrType, ".type") properties.set_prop("typeHandlerVersion", AAZStrType, ".type_handler_version") protected_settings = _builder.get(".extensionProfile.extensions[].properties.protectedSettings") if protected_settings is not None: - protected_settings.set_anytype_elements(".") + protected_settings.set_elements(AAZAnyType, ".") protected_settings_from_key_vault = _builder.get(".extensionProfile.extensions[].properties.protectedSettingsFromKeyVault") if protected_settings_from_key_vault is not None: @@ -2255,7 +2297,7 @@ def _build_schema_base_virtual_machine_profile_create(cls, _builder): settings = _builder.get(".extensionProfile.extensions[].properties.settings") if settings is not None: - settings.set_anytype_elements(".") + settings.set_elements(AAZAnyType, ".") hardware_profile = _builder.get(".hardwareProfile") if hardware_profile is not None: @@ -2802,7 +2844,7 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): flags={"read_only": True}, ) properties.publisher = AAZStrType() - properties.settings = AAZFreeFormDictType() + properties.settings = AAZDictType() properties.suppress_failures = AAZBoolType( serialized_name="suppressFailures", ) @@ -2825,6 +2867,9 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): provision_after_extensions = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.provision_after_extensions provision_after_extensions.Element = AAZStrType() + settings = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.settings + settings.Element = AAZAnyType() + hardware_profile = _schema_base_virtual_machine_profile_read.hardware_profile hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", diff --git a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_delete.py b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_delete.py index f343c21e6e4..7088d577774 100644 --- a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_delete.py @@ -19,16 +19,14 @@ class Delete(AAZCommand): """Delete an Azure Compute Fleet - Delete an Azure Compute Fleet - :example: Fleets_Delete az azure-fleet delete --resource-group rgazurefleet --fleet-name testFleet """ _aaz_info = { - "version": "2024-11-01", + "version": "2026-04-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2024-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2026-04-01-preview"], ] } @@ -149,7 +147,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list.py b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list.py index 8e5669a0d15..f948699ffa5 100644 --- a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list.py +++ b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list.py @@ -18,17 +18,15 @@ class List(AAZCommand): """List Fleet resources by subscription ID and resource group - List Fleet resources by subscription ID and resource group - :example: Fleets_ListBySubscription az azure-fleet list """ _aaz_info = { - "version": "2024-11-01", + "version": "2026-04-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurefleet/fleets", "2024-11-01"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets", "2024-11-01"], + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurefleet/fleets", "2026-04-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets", "2026-04-01-preview"], ] } @@ -119,7 +117,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } @@ -237,10 +235,14 @@ def _build_schema_on_200(cls): properties.additional_locations_profile = AAZObjectType( serialized_name="additionalLocationsProfile", ) + properties.capacity_type = AAZStrType( + serialized_name="capacityType", + ) properties.compute_profile = AAZObjectType( serialized_name="computeProfile", flags={"required": True}, ) + properties.mode = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -262,10 +264,16 @@ def _build_schema_on_200(cls): properties.vm_attributes = AAZObjectType( serialized_name="vmAttributes", ) + properties.vm_name_prefix = AAZStrType( + serialized_name="vmNamePrefix", + ) properties.vm_sizes_profile = AAZListType( serialized_name="vmSizesProfile", flags={"required": True}, ) + properties.zone_allocation_policy = AAZObjectType( + serialized_name="zoneAllocationPolicy", + ) additional_locations_profile = cls._schema_on_200.value.Element.properties.additional_locations_profile additional_locations_profile.location_profiles = AAZListType( @@ -437,6 +445,24 @@ def _build_schema_on_200(cls): ) _element.rank = AAZIntType() + zone_allocation_policy = cls._schema_on_200.value.Element.properties.zone_allocation_policy + zone_allocation_policy.distribution_strategy = AAZStrType( + serialized_name="distributionStrategy", + flags={"required": True}, + ) + zone_allocation_policy.zone_preferences = AAZListType( + serialized_name="zonePreferences", + ) + + zone_preferences = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences + zone_preferences.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences.Element + _element.rank = AAZIntType() + _element.zone = AAZStrType( + flags={"required": True}, + ) + system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", @@ -505,7 +531,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } @@ -623,10 +649,14 @@ def _build_schema_on_200(cls): properties.additional_locations_profile = AAZObjectType( serialized_name="additionalLocationsProfile", ) + properties.capacity_type = AAZStrType( + serialized_name="capacityType", + ) properties.compute_profile = AAZObjectType( serialized_name="computeProfile", flags={"required": True}, ) + properties.mode = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -648,10 +678,16 @@ def _build_schema_on_200(cls): properties.vm_attributes = AAZObjectType( serialized_name="vmAttributes", ) + properties.vm_name_prefix = AAZStrType( + serialized_name="vmNamePrefix", + ) properties.vm_sizes_profile = AAZListType( serialized_name="vmSizesProfile", flags={"required": True}, ) + properties.zone_allocation_policy = AAZObjectType( + serialized_name="zoneAllocationPolicy", + ) additional_locations_profile = cls._schema_on_200.value.Element.properties.additional_locations_profile additional_locations_profile.location_profiles = AAZListType( @@ -823,6 +859,24 @@ def _build_schema_on_200(cls): ) _element.rank = AAZIntType() + zone_allocation_policy = cls._schema_on_200.value.Element.properties.zone_allocation_policy + zone_allocation_policy.distribution_strategy = AAZStrType( + serialized_name="distributionStrategy", + flags={"required": True}, + ) + zone_allocation_policy.zone_preferences = AAZListType( + serialized_name="zonePreferences", + ) + + zone_preferences = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences + zone_preferences.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences.Element + _element.rank = AAZIntType() + _element.zone = AAZStrType( + flags={"required": True}, + ) + system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", @@ -1024,7 +1078,7 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): flags={"read_only": True}, ) properties.publisher = AAZStrType() - properties.settings = AAZFreeFormDictType() + properties.settings = AAZDictType() properties.suppress_failures = AAZBoolType( serialized_name="suppressFailures", ) @@ -1047,6 +1101,9 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): provision_after_extensions = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.provision_after_extensions provision_after_extensions.Element = AAZStrType() + settings = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.settings + settings.Element = AAZAnyType() + hardware_profile = _schema_base_virtual_machine_profile_read.hardware_profile hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", diff --git a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list_vmss.py b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list_vmss.py index 21528693bcd..ca87fde5ae3 100644 --- a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list_vmss.py +++ b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_list_vmss.py @@ -18,16 +18,14 @@ class ListVmss(AAZCommand): """List VirtualMachineScaleSet resources by Fleet - List VirtualMachineScaleSet resources by Fleet - :example: Fleets_ListVirtualMachineScaleSets az azure-fleet virtual-machine-scale-set list --resource-group rgazurefleet --name myFleet """ _aaz_info = { - "version": "2024-11-01", + "version": "2026-04-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}/virtualmachinescalesets", "2024-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}/virtualmachinescalesets", "2026-04-01-preview"], ] } @@ -127,7 +125,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_show.py b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_show.py index 0affa103262..082a2098895 100644 --- a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_show.py +++ b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_show.py @@ -18,16 +18,14 @@ class Show(AAZCommand): """Get a Fleet - Get a Fleet by fleet name - :example: Fleets_Get az azure-fleet show --resource-group rgazurefleet --fleet-name testFleet """ _aaz_info = { - "version": "2024-11-01", + "version": "2026-04-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2024-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2026-04-01-preview"], ] } @@ -126,7 +124,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } @@ -233,10 +231,14 @@ def _build_schema_on_200(cls): properties.additional_locations_profile = AAZObjectType( serialized_name="additionalLocationsProfile", ) + properties.capacity_type = AAZStrType( + serialized_name="capacityType", + ) properties.compute_profile = AAZObjectType( serialized_name="computeProfile", flags={"required": True}, ) + properties.mode = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -258,10 +260,16 @@ def _build_schema_on_200(cls): properties.vm_attributes = AAZObjectType( serialized_name="vmAttributes", ) + properties.vm_name_prefix = AAZStrType( + serialized_name="vmNamePrefix", + ) properties.vm_sizes_profile = AAZListType( serialized_name="vmSizesProfile", flags={"required": True}, ) + properties.zone_allocation_policy = AAZObjectType( + serialized_name="zoneAllocationPolicy", + ) additional_locations_profile = cls._schema_on_200.properties.additional_locations_profile additional_locations_profile.location_profiles = AAZListType( @@ -433,6 +441,24 @@ def _build_schema_on_200(cls): ) _element.rank = AAZIntType() + zone_allocation_policy = cls._schema_on_200.properties.zone_allocation_policy + zone_allocation_policy.distribution_strategy = AAZStrType( + serialized_name="distributionStrategy", + flags={"required": True}, + ) + zone_allocation_policy.zone_preferences = AAZListType( + serialized_name="zonePreferences", + ) + + zone_preferences = cls._schema_on_200.properties.zone_allocation_policy.zone_preferences + zone_preferences.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.zone_allocation_policy.zone_preferences.Element + _element.rank = AAZIntType() + _element.zone = AAZStrType( + flags={"required": True}, + ) + system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", @@ -634,7 +660,7 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): flags={"read_only": True}, ) properties.publisher = AAZStrType() - properties.settings = AAZFreeFormDictType() + properties.settings = AAZDictType() properties.suppress_failures = AAZBoolType( serialized_name="suppressFailures", ) @@ -657,6 +683,9 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): provision_after_extensions = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.provision_after_extensions provision_after_extensions.Element = AAZStrType() + settings = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.settings + settings.Element = AAZAnyType() + hardware_profile = _schema_base_virtual_machine_profile_read.hardware_profile hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", diff --git a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_update.py b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_update.py index 35cab3bab18..d9a409cd923 100644 --- a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_update.py +++ b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_update.py @@ -18,16 +18,14 @@ class Update(AAZCommand): """Update a Fleet - Update a Fleet by fleet name - :example: Fleets_CreateOrUpdate az azure-fleet update --resource-group rgazurefleet --fleet-name testFleet --spot-priority-profile "{capacity:20,min-capacity:10,max-price-per-vm:0.00865,eviction-policy:Delete,allocation-strategy:PriceCapacityOptimized,maintain:True}" --regular-priority-profile "{capacity:20,min-capacity:10,allocation-strategy:LowestPrice}" --vm-sizes-profile "[{name:Standard_d1_v2,rank:19225}]" --compute-profile "{base-virtual-machine-profile:{osProfile:{computerNamePrefix:o,adminUsername:nrgzqciiaaxjrqldbmjbqkyhntp,adminPassword:adfbrdxpv,customData:xjjib,windowsConfiguration:{provisionVMAgent:True,enableAutomaticUpdates:True,timeZone:hlyjiqcfksgrpjrct,additionalUnattendContent:[{passName:OobeSystem,componentName:Microsoft-Windows-Shell-Setup,settingName:AutoLogon,content:bubmqbxjkj}],patchSettings:{patchMode:Manual,enableHotpatching:True,assessmentMode:ImageDefault,automaticByPlatformSettings:{rebootSetting:Unknown,bypassPlatformSafetyChecksOnUserSchedule:True}},winRM:{listeners:[{protocol:Https,certificateUrl:'https://myVaultName.vault.azure.net/secrets/myCertName'}]},enableVMAgentPlatformUpdates:True},linuxConfiguration:{disablePasswordAuthentication:True,ssh:{publicKeys:[{path:kmqz,keyData:kivgsubusvpprwqaqpjcmhsv}]},provisionVMAgent:True,patchSettings:{patchMode:ImageDefault,assessmentMode:ImageDefault,automaticByPlatformSettings:{rebootSetting:Unknown,bypassPlatformSafetyChecksOnUserSchedule:True}},enableVMAgentPlatformUpdates:True},secrets:[{sourceVault:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'},vaultCertificates:[{certificateUrl:'https://myVaultName.vault.azure.net/secrets/myCertName',certificateStore:nlxrwavpzhueffxsshlun}]}],allowExtensionOperations:True,requireGuestProvisionSignal:True},storageProfile:{imageReference:{publisher:mqxgwbiyjzmxavhbkd,offer:isxgumkarlkomp,sku:eojmppqcrnpmxirtp,version:wvpcqefgtmqdgltiuz,sharedGalleryImageId:kmkgihoxwlawuuhcinfirktdwkmx,communityGalleryImageId:vlqe,id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}'},osDisk:{name:wfttw,caching:None,writeAcceleratorEnabled:True,createOption:FromImage,diffDiskSettings:{option:Local,placement:CacheDisk},diskSizeGB:14,osType:Windows,image:{uri:'https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd'},vhdContainers:[tkzcwddtinkfpnfklatw],managedDisk:{storageAccountType:Standard_LRS,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'},securityProfile:{securityEncryptionType:VMGuestStateOnly,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'}}},deleteOption:Delete},dataDisks:[{name:eogiykmdmeikswxmigjws,lun:14,caching:None,writeAcceleratorEnabled:True,createOption:FromImage,diskSizeGB:6,managedDisk:{storageAccountType:Standard_LRS,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'},securityProfile:{securityEncryptionType:VMGuestStateOnly,diskEncryptionSet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'}}},diskIOPSReadWrite:27,diskMBpsReadWrite:2,deleteOption:Delete}],diskControllerType:uzb},networkProfile:{healthProbe:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'},networkInterfaceConfigurations:[{name:i,properties:{primary:True,enableAcceleratedNetworking:True,disableTcpStateTracking:True,enableFpga:True,networkSecurityGroup:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'},dnsSettings:{dnsServers:[nxmmfolhclsesu]},ipConfigurations:[{name:oezqhkidfhyywlfzwuotilrpbqnjg,properties:{subnet:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'},primary:True,publicIPAddressConfiguration:{name:fvpqf,properties:{idleTimeoutInMinutes:9,dnsSettings:{domainNameLabel:ukrddzvmorpmfsczjwtbvp,domainNameLabelScope:TenantReuse},ipTags:[{ipTagType:sddgsoemnzgqizale,tag:wufmhrjsakbiaetyara}],publicIPPrefix:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}'},publicIPAddressVersion:IPv4,deleteOption:Delete},sku:{name:Basic,tier:Regional}},privateIPAddressVersion:IPv4,applicationGatewayBackendAddressPools:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'}],applicationSecurityGroups:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'}],loadBalancerBackendAddressPools:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'}],loadBalancerInboundNatPools:[{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'}]}}],enableIPForwarding:True,deleteOption:Delete,auxiliaryMode:None,auxiliarySku:None}}],networkApiVersion:2020-11-01},securityProfile:{uefiSettings:{secureBootEnabled:True,vTpmEnabled:True},encryptionAtHost:True,securityType:TrustedLaunch,encryptionIdentity:{userAssignedIdentityResourceId:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}'},proxyAgentSettings:{enabled:True,mode:Audit,keyIncarnationId:20}},diagnosticsProfile:{bootDiagnostics:{enabled:True,storageUri:'http://myStorageAccountName.blob.core.windows.net'}},extensionProfile:{extensions:[{name:bndxuxx,properties:{forceUpdateTag:yhgxw,publisher:kpxtirxjfprhs,type:pgjilctjjwaa,typeHandlerVersion:zevivcoilxmbwlrihhhibq,autoUpgradeMinorVersion:True,enableAutomaticUpgrade:True,settings:{},protectedSettings:{},provisionAfterExtensions:[nftzosroolbcwmpupujzqwqe],suppressFailures:True,protectedSettingsFromKeyVault:{secretUrl:'https://myvaultName.vault.azure.net/secrets/secret/mySecretName',sourceVault:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'}}}}],extensionsTimeBudget:mbhjahtdygwgyszdwjtvlvtgchdwil},licenseType:v,scheduledEventsProfile:{terminateNotificationProfile:{notBeforeTimeout:iljppmmw,enable:True},osImageNotificationProfile:{notBeforeTimeout:olbpadmevekyczfokodtfprxti,enable:True}},userData:s,capacityReservation:{capacityReservationGroup:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}'}},applicationProfile:{galleryApplications:[{tags:eyrqjbib,order:5,packageReferenceId:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}',configurationReference:ulztmiavpojpbpbddgnuuiimxcpau,treatFailureAsDeploymentFailure:True,enableAutomaticUpgrade:True}]},hardwareProfile:{vmSizeProperties:{vCPUsAvailable:16,vCPUsPerCore:23}},serviceArtifactReference:{id:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}'},securityPostureReference:{id:'/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest',excludeExtensions:['{securityPostureVMExtensionName}'],isOverridable:True}},compute-api-version:2023-07-01,platform-fault-domain-count:1}" --zones "[zone1,zone2]" --identity "{type:UserAssigned,user-assigned-identities:{key9851:{}}}" --tags "{key3518:luvrnuvsgdpbuofdskkcoqhfh}" --location westus --plan "{name:jwgrcrnrtfoxn,publisher:iozjbiqqckqm,product:cgopbyvdyqikahwyxfpzwaqk,promotion-code:naglezezplcaruqogtxnuizslqnnbr,version:wa}" """ _aaz_info = { - "version": "2024-11-01", + "version": "2026-04-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2024-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2026-04-01-preview"], ] } @@ -77,6 +75,13 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="Compute Profile to use for running user's workloads.", ) + _args_schema.mode = AAZStrArg( + options=["--mode"], + arg_group="Properties", + help="Mode of the Fleet.", + nullable=True, + enum={"Launch": "Launch", "Managed": "Managed"}, + ) _args_schema.regular_priority_profile = AAZObjectArg( options=["--rpp", "--regular-priority-profile"], arg_group="Properties", @@ -95,6 +100,15 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Attribute based Fleet.", nullable=True, ) + _args_schema.vm_name_prefix = AAZStrArg( + options=["--vm-name-prefix"], + arg_group="Properties", + help="VirtualMachine prefix to be used for the virtual machines launched by Fleet. Can be used only with Launch mode.", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^[^_\\W][\\w\\-._]{0,64}(?
**Minimum-length (Windows):** 8 characters

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

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

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

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

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)", nullable=True, - blank=AAZPromptPasswordInput( - msg="VM Admin Password", - confirm=True), + prompt={"cls": "AAZPromptPasswordInput", "kwargs": {"msg": "Please provide VMSS password:", "confirm": True}}, ) os_profile.admin_username = AAZStrArg( options=["admin-username"], @@ -1066,9 +1088,7 @@ def _build_args_base_virtual_machine_profile_update(cls, _schema): options=["custom-data"], help="Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)", nullable=True, - blank=AAZPromptPasswordInput( - msg="VM Admin Password", - confirm=True), + prompt={"cls": "AAZPromptPasswordInput", "kwargs": {"msg": "Please enter VM Password:", "confirm": True}}, ) os_profile.linux_configuration = AAZObjectArg( options=["linux-configuration"], @@ -1262,9 +1282,7 @@ def _build_args_base_virtual_machine_profile_update(cls, _schema): options=["content"], help="Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.", nullable=True, - blank=AAZPromptPasswordInput( - msg="VM Admin Password", - confirm=True), + prompt={"cls": "AAZPromptPasswordInput", "kwargs": {"msg": "Password:"}}, ) _element.pass_name = AAZStrArg( options=["pass-name"], @@ -1927,7 +1945,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } @@ -2026,7 +2044,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } @@ -2111,9 +2129,11 @@ def _update_instance(self, instance): if properties is not None: properties.set_prop("additionalLocationsProfile", AAZObjectType, ".additional_locations_profile") properties.set_prop("computeProfile", AAZObjectType, ".compute_profile", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("mode", AAZStrType, ".mode") properties.set_prop("regularPriorityProfile", AAZObjectType, ".regular_priority_profile") properties.set_prop("spotPriorityProfile", AAZObjectType, ".spot_priority_profile") properties.set_prop("vmAttributes", AAZObjectType, ".vm_attributes") + properties.set_prop("vmNamePrefix", AAZStrType, ".vm_name_prefix") properties.set_prop("vmSizesProfile", AAZListType, ".vm_sizes_profile", typ_kwargs={"flags": {"required": True}}) additional_locations_profile = _builder.get(".properties.additionalLocationsProfile") @@ -2312,18 +2332,18 @@ def _build_schema_base_virtual_machine_profile_update(cls, _builder): properties.set_prop("autoUpgradeMinorVersion", AAZBoolType, ".auto_upgrade_minor_version") properties.set_prop("enableAutomaticUpgrade", AAZBoolType, ".enable_automatic_upgrade") properties.set_prop("forceUpdateTag", AAZStrType, ".force_update_tag") - properties.set_prop("protectedSettings", AAZFreeFormDictType, ".protected_settings", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("protectedSettings", AAZDictType, ".protected_settings", typ_kwargs={"flags": {"secret": True}}) properties.set_prop("protectedSettingsFromKeyVault", AAZObjectType, ".protected_settings_from_key_vault") properties.set_prop("provisionAfterExtensions", AAZListType, ".provision_after_extensions") properties.set_prop("publisher", AAZStrType, ".publisher") - properties.set_prop("settings", AAZFreeFormDictType, ".settings") + properties.set_prop("settings", AAZDictType, ".settings") properties.set_prop("suppressFailures", AAZBoolType, ".suppress_failures") properties.set_prop("type", AAZStrType, ".type") properties.set_prop("typeHandlerVersion", AAZStrType, ".type_handler_version") protected_settings = _builder.get(".extensionProfile.extensions[].properties.protectedSettings") if protected_settings is not None: - protected_settings.set_anytype_elements(".") + protected_settings.set_elements(AAZAnyType, ".") protected_settings_from_key_vault = _builder.get(".extensionProfile.extensions[].properties.protectedSettingsFromKeyVault") if protected_settings_from_key_vault is not None: @@ -2336,7 +2356,7 @@ def _build_schema_base_virtual_machine_profile_update(cls, _builder): settings = _builder.get(".extensionProfile.extensions[].properties.settings") if settings is not None: - settings.set_anytype_elements(".") + settings.set_elements(AAZAnyType, ".") hardware_profile = _builder.get(".hardwareProfile") if hardware_profile is not None: @@ -2883,7 +2903,7 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): flags={"read_only": True}, ) properties.publisher = AAZStrType() - properties.settings = AAZFreeFormDictType() + properties.settings = AAZDictType() properties.suppress_failures = AAZBoolType( serialized_name="suppressFailures", ) @@ -2906,6 +2926,9 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): provision_after_extensions = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.provision_after_extensions provision_after_extensions.Element = AAZStrType() + settings = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.settings + settings.Element = AAZAnyType() + hardware_profile = _schema_base_virtual_machine_profile_read.hardware_profile hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties", @@ -3546,10 +3569,14 @@ def _build_schema_fleet_read(cls, _schema): properties.additional_locations_profile = AAZObjectType( serialized_name="additionalLocationsProfile", ) + properties.capacity_type = AAZStrType( + serialized_name="capacityType", + ) properties.compute_profile = AAZObjectType( serialized_name="computeProfile", flags={"required": True}, ) + properties.mode = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -3571,10 +3598,16 @@ def _build_schema_fleet_read(cls, _schema): properties.vm_attributes = AAZObjectType( serialized_name="vmAttributes", ) + properties.vm_name_prefix = AAZStrType( + serialized_name="vmNamePrefix", + ) properties.vm_sizes_profile = AAZListType( serialized_name="vmSizesProfile", flags={"required": True}, ) + properties.zone_allocation_policy = AAZObjectType( + serialized_name="zoneAllocationPolicy", + ) additional_locations_profile = _schema_fleet_read.properties.additional_locations_profile additional_locations_profile.location_profiles = AAZListType( @@ -3746,6 +3779,24 @@ def _build_schema_fleet_read(cls, _schema): ) _element.rank = AAZIntType() + zone_allocation_policy = _schema_fleet_read.properties.zone_allocation_policy + zone_allocation_policy.distribution_strategy = AAZStrType( + serialized_name="distributionStrategy", + flags={"required": True}, + ) + zone_allocation_policy.zone_preferences = AAZListType( + serialized_name="zonePreferences", + ) + + zone_preferences = _schema_fleet_read.properties.zone_allocation_policy.zone_preferences + zone_preferences.Element = AAZObjectType() + + _element = _schema_fleet_read.properties.zone_allocation_policy.zone_preferences.Element + _element.rank = AAZIntType() + _element.zone = AAZStrType( + flags={"required": True}, + ) + system_data = _schema_fleet_read.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_wait.py b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_wait.py index 7addf668f22..f76c958eced 100644 --- a/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_wait.py +++ b/src/azure-cli/azure/cli/command_modules/computefleet/aaz/latest/compute_fleet/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2024-11-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2026-04-01-preview"], ] } @@ -119,7 +119,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-11-01", + "api-version", "2026-04-01-preview", required=True, ), } @@ -226,10 +226,14 @@ def _build_schema_on_200(cls): properties.additional_locations_profile = AAZObjectType( serialized_name="additionalLocationsProfile", ) + properties.capacity_type = AAZStrType( + serialized_name="capacityType", + ) properties.compute_profile = AAZObjectType( serialized_name="computeProfile", flags={"required": True}, ) + properties.mode = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -251,10 +255,16 @@ def _build_schema_on_200(cls): properties.vm_attributes = AAZObjectType( serialized_name="vmAttributes", ) + properties.vm_name_prefix = AAZStrType( + serialized_name="vmNamePrefix", + ) properties.vm_sizes_profile = AAZListType( serialized_name="vmSizesProfile", flags={"required": True}, ) + properties.zone_allocation_policy = AAZObjectType( + serialized_name="zoneAllocationPolicy", + ) additional_locations_profile = cls._schema_on_200.properties.additional_locations_profile additional_locations_profile.location_profiles = AAZListType( @@ -426,6 +436,24 @@ def _build_schema_on_200(cls): ) _element.rank = AAZIntType() + zone_allocation_policy = cls._schema_on_200.properties.zone_allocation_policy + zone_allocation_policy.distribution_strategy = AAZStrType( + serialized_name="distributionStrategy", + flags={"required": True}, + ) + zone_allocation_policy.zone_preferences = AAZListType( + serialized_name="zonePreferences", + ) + + zone_preferences = cls._schema_on_200.properties.zone_allocation_policy.zone_preferences + zone_preferences.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.zone_allocation_policy.zone_preferences.Element + _element.rank = AAZIntType() + _element.zone = AAZStrType( + flags={"required": True}, + ) + system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", @@ -627,7 +655,7 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): flags={"read_only": True}, ) properties.publisher = AAZStrType() - properties.settings = AAZFreeFormDictType() + properties.settings = AAZDictType() properties.suppress_failures = AAZBoolType( serialized_name="suppressFailures", ) @@ -650,6 +678,9 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema): provision_after_extensions = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.provision_after_extensions provision_after_extensions.Element = AAZStrType() + settings = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.settings + settings.Element = AAZAnyType() + hardware_profile = _schema_base_virtual_machine_profile_read.hardware_profile hardware_profile.vm_size_properties = AAZObjectType( serialized_name="vmSizeProperties",