From db2ff1944115816d5f779330ef062b5ce43fb513 Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Tue, 16 Apr 2024 07:57:14 +0000
Subject: [PATCH 1/4] Move Compute to main
---
.../Compute.Autorest/Az.Compute.format.ps1xml | 598 ++-
src/Compute/Compute.Autorest/Az.Compute.psd1 | 2 +-
src/Compute/Compute.Autorest/Az.Compute.psm1 | 24 +-
src/Compute/Compute.Autorest/README.md | 32 +-
.../UX/Microsoft.Compute/locations.json | 42 +
.../Invoke-AzSpotPlacementRecommender.md | 153 +
.../exports/Get-AzGalleryApplication.ps1 | 9 +-
.../Get-AzGalleryApplicationVersion.ps1 | 9 +-
.../Invoke-AzSpotPlacementRecommender.ps1 | 309 ++
.../exports/New-AzGalleryApplication.ps1 | 8 +-
.../New-AzGalleryApplicationVersion.ps1 | 8 +-
.../exports/ProxyCmdletDefinitions.ps1 | 398 +-
.../exports/Remove-AzGalleryApplication.ps1 | 9 +-
.../Remove-AzGalleryApplicationVersion.ps1 | 9 +-
.../exports/Remove-AzVMRunCommand.ps1 | 9 +-
.../exports/Remove-AzVmssVMRunCommand.ps1 | 9 +-
.../exports/Set-AzVMRunCommand.ps1 | 8 +-
.../exports/Set-AzVmssVMRunCommand.ps1 | 8 +-
.../exports/Update-AzGalleryApplication.ps1 | 9 +-
.../Update-AzGalleryApplicationVersion.ps1 | 9 +-
.../Compute.Autorest/generated/Module.cs | 8 +
.../Compute.Autorest/generated/api/Compute.cs | 3817 ++++++++++++-----
.../generated/api/Models/Any.PowerShell.cs | 136 +
.../generated/api/Models/Any.TypeConverter.cs | 146 +
.../generated/api/Models/Any.cs | 34 +
.../generated/api/Models/Any.json.cs | 104 +
.../Api10/ResourceAutoGenerated.PowerShell.cs | 176 +
.../ResourceAutoGenerated.TypeConverter.cs | 147 +
.../api/Models/Api10/ResourceAutoGenerated.cs | 128 +
.../Api10/ResourceAutoGenerated.json.cs | 125 +
... => SystemDataAutoGenerated.PowerShell.cs} | 46 +-
.../SystemDataAutoGenerated.TypeConverter.cs | 147 +
...stemData.cs => SystemDataAutoGenerated.cs} | 18 +-
...son.cs => SystemDataAutoGenerated.json.cs} | 18 +-
.../Models/Api20220103/Gallery.PowerShell.cs | 20 +-
.../api/Models/Api20220103/Gallery.cs | 37 +-
.../api/Models/Api20220103/Gallery.json.cs | 2 +-
.../GalleryApplication.PowerShell.cs | 20 +-
.../Models/Api20220103/GalleryApplication.cs | 31 +-
.../Api20220103/GalleryApplication.json.cs | 2 +-
.../GalleryApplicationVersion.PowerShell.cs | 20 +-
.../Api20220103/GalleryApplicationVersion.cs | 37 +-
.../GalleryApplicationVersion.json.cs | 2 +-
.../Api20220103/GalleryImage.PowerShell.cs | 20 +-
.../api/Models/Api20220103/GalleryImage.cs | 37 +-
.../Models/Api20220103/GalleryImage.json.cs | 2 +-
.../GalleryImageVersion.PowerShell.cs | 20 +-
.../Models/Api20220103/GalleryImageVersion.cs | 37 +-
.../Api20220103/GalleryImageVersion.json.cs | 2 +-
.../Resource.PowerShell.cs | 40 +-
.../Resource.TypeConverter.cs | 6 +-
.../Models/{Api10 => Api20220103}/Resource.cs | 12 +-
.../{Api10 => Api20220103}/Resource.json.cs | 8 +-
.../VirtualMachineRunCommand.PowerShell.cs | 20 +-
.../Api20230701/VirtualMachineRunCommand.cs | 29 +-
.../VirtualMachineRunCommand.json.cs | 4 +-
.../ComputeDiagnosticBase.PowerShell.cs | 234 +
.../ComputeDiagnosticBase.TypeConverter.cs | 147 +
.../ComputeDiagnosticBase.cs | 137 +
.../ComputeDiagnosticBase.json.cs | 110 +
.../ComputeDiagnosticsList.PowerShell.cs | 154 +
.../ComputeDiagnosticsList.TypeConverter.cs | 147 +
.../ComputeDiagnosticsList.cs | 74 +
.../ComputeDiagnosticsList.json.cs | 118 +
...teDiagnosticsOperationResult.PowerShell.cs | 220 +
...iagnosticsOperationResult.TypeConverter.cs | 148 +
.../ComputeDiagnosticsOperationResult.cs | 199 +
.../ComputeDiagnosticsOperationResult.json.cs | 116 +
.../DiagnosticProperties.PowerShell.cs | 146 +
.../DiagnosticProperties.TypeConverter.cs | 147 +
.../DiagnosticProperties.cs | 51 +
.../DiagnosticProperties.json.cs | 116 +
.../ErrorDetailAutoGenerated.PowerShell.cs | 194 +
.../ErrorDetailAutoGenerated.TypeConverter.cs | 147 +
.../ErrorDetailAutoGenerated.cs | 142 +
.../ErrorDetailAutoGenerated.json.cs | 124 +
.../ErrorResponseAutoGenerated.PowerShell.cs | 186 +
...rrorResponseAutoGenerated.TypeConverter.cs | 147 +
.../ErrorResponseAutoGenerated.cs | 131 +
.../ErrorResponseAutoGenerated.json.cs | 108 +
.../PlacementScore.PowerShell.cs | 176 +
.../PlacementScore.TypeConverter.cs | 147 +
.../Api20240301Preview/PlacementScore.cs | 119 +
.../Api20240301Preview/PlacementScore.json.cs | 116 +
.../ResourceSize.PowerShell.cs | 144 +
.../ResourceSize.TypeConverter.cs | 147 +
.../Models/Api20240301Preview/ResourceSize.cs | 51 +
.../Api20240301Preview/ResourceSize.json.cs | 108 +
.../RunDiskInspectionInput.PowerShell.cs | 162 +
.../RunDiskInspectionInput.TypeConverter.cs | 147 +
.../RunDiskInspectionInput.cs | 85 +
.../RunDiskInspectionInput.json.cs | 112 +
...potPlacementRecommenderInput.PowerShell.cs | 170 +
...PlacementRecommenderInput.TypeConverter.cs | 147 +
.../SpotPlacementRecommenderInput.cs | 102 +
.../SpotPlacementRecommenderInput.json.cs | 130 +
...PlacementRecommenderResponse.PowerShell.cs | 178 +
...cementRecommenderResponse.TypeConverter.cs | 148 +
.../SpotPlacementRecommenderResponse.cs | 119 +
.../SpotPlacementRecommenderResponse.json.cs | 140 +
.../StorageConfigurationInput.PowerShell.cs | 146 +
...StorageConfigurationInput.TypeConverter.cs | 147 +
.../StorageConfigurationInput.cs | 57 +
.../StorageConfigurationInput.json.cs | 108 +
...StorageConfigurationResponse.PowerShell.cs | 146 +
...rageConfigurationResponse.TypeConverter.cs | 147 +
.../StorageConfigurationResponse.cs | 57 +
.../StorageConfigurationResponse.json.cs | 108 +
.../Api40/ErrorAdditionalInfo.PowerShell.cs | 152 +
.../ErrorAdditionalInfo.TypeConverter.cs | 147 +
.../api/Models/Api40/ErrorAdditionalInfo.cs | 74 +
.../Models/Api40/ErrorAdditionalInfo.json.cs | 116 +
.../Models/Api40/ErrorDetail.PowerShell.cs | 176 +
.../Models/Api40/ErrorDetail.TypeConverter.cs | 147 +
.../generated/api/Models/Api40/ErrorDetail.cs | 134 +
.../api/Models/Api40/ErrorDetail.json.cs | 147 +
.../Models/Api40/ErrorResponse.PowerShell.cs | 188 +
.../Api40/ErrorResponse.TypeConverter.cs | 147 +
.../api/Models/Api40/ErrorResponse.cs | 136 +
.../api/Models/Api40/ErrorResponse.json.cs | 111 +
.../Models/Api40/ProxyResource.PowerShell.cs | 218 +
.../Api40/ProxyResource.TypeConverter.cs | 147 +
.../api/Models/Api40/ProxyResource.cs | 113 +
.../api/Models/Api40/ProxyResource.json.cs | 110 +
.../ResourceAutoGenerated2.PowerShell.cs | 218 +
.../ResourceAutoGenerated2.TypeConverter.cs | 147 +
.../Models/Api40/ResourceAutoGenerated2.cs | 208 +
.../Api40/ResourceAutoGenerated2.json.cs | 128 +
.../api/Models/Api40/SystemData.PowerShell.cs | 184 +
.../SystemData.TypeConverter.cs | 6 +-
.../generated/api/Models/Api40/SystemData.cs | 136 +
.../api/Models/Api40/SystemData.json.cs | 118 +
.../api/Models/ComputeIdentity.PowerShell.cs | 8 +
.../generated/api/Models/ComputeIdentity.cs | 17 +
.../api/Models/ComputeIdentity.json.cs | 2 +
.../api/Support/CreatedByType.Completer.cs | 47 +
.../Support/CreatedByType.TypeConverter.cs | 59 +
.../generated/api/Support/CreatedByType.cs | 102 +
.../api/Support/ResultStatus.Completer.cs | 39 +
.../api/Support/ResultStatus.TypeConverter.cs | 59 +
.../generated/api/Support/ResultStatus.cs | 98 +
.../GetAzGalleryApplicationVersion_Get.cs | 34 +-
...alleryApplicationVersion_GetViaIdentity.cs | 34 +-
.../GetAzGalleryApplicationVersion_List.cs | 34 +-
.../cmdlets/GetAzGalleryApplication_Get.cs | 34 +-
.../GetAzGalleryApplication_GetViaIdentity.cs | 34 +-
.../cmdlets/GetAzGalleryApplication_List.cs | 34 +-
.../InvokeAzSpotPlacementRecommender_Post.cs | 439 ++
...AzSpotPlacementRecommender_PostExpanded.cs | 475 ++
...potPlacementRecommender_PostViaIdentity.cs | 428 ++
...mentRecommender_PostViaIdentityExpanded.cs | 464 ++
...alleryApplicationVersion_CreateExpanded.cs | 34 +-
.../NewAzGalleryApplication_CreateExpanded.cs | 34 +-
...emoveAzGalleryApplicationVersion_Delete.cs | 34 +-
...eryApplicationVersion_DeleteViaIdentity.cs | 34 +-
.../RemoveAzGalleryApplication_Delete.cs | 34 +-
...eAzGalleryApplication_DeleteViaIdentity.cs | 34 +-
.../cmdlets/RemoveAzVMRunCommand_Delete.cs | 34 +-
.../RemoveAzVMRunCommand_DeleteViaIdentity.cs | 34 +-
.../RemoveAzVmssVMRunCommand_Delete.cs | 34 +-
...oveAzVmssVMRunCommand_DeleteViaIdentity.cs | 34 +-
.../SetAzVMRunCommand_UpdateExpanded.cs | 34 +-
.../SetAzVmssVMRunCommand_UpdateExpanded.cs | 34 +-
...alleryApplicationVersion_UpdateExpanded.cs | 34 +-
...cationVersion_UpdateViaIdentityExpanded.cs | 34 +-
...dateAzGalleryApplication_UpdateExpanded.cs | 34 +-
...ryApplication_UpdateViaIdentityExpanded.cs | 34 +-
.../BuildTime/Models/PsProxyOutputs.cs | 23 +-
.../Compute.Autorest/help/Az.Compute.md | 3 +
.../help/Invoke-AzSpotPlacementRecommender.md | 391 ++
.../internal/Az.Compute.internal.psm1 | 4 +-
.../internal/New-AzGalleryApplication.ps1 | 8 +-
.../New-AzGalleryApplicationVersion.ps1 | 8 +-
.../internal/ProxyCmdletDefinitions.ps1 | 25 +-
.../Update-AzGalleryApplicationVersion.ps1 | 9 +-
src/Compute/Compute.Autorest/test-module.ps1 | 8 +-
...-AzSpotPlacementRecommender.Recording.json | 154 +
...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 64 +
src/Compute/Compute.Autorest/test/env.json | 10 +-
src/Compute/Compute.Autorest/test/loadEnv.ps1 | 2 +-
.../Compute.Autorest/test/localEnv.json | 10 +-
.../utils/Get-SubscriptionIdTestSafe.ps1 | 7 +
src/Compute/Compute/Az.Compute.psd1 | 21 +-
.../Compute/help/Add-AzImageDataDisk.md | 17 +-
.../help/Add-AzVMAdditionalUnattendContent.md | 17 +-
src/Compute/Compute/help/Add-AzVMDataDisk.md | 19 +-
.../Compute/help/Add-AzVMNetworkInterface.md | 19 +-
src/Compute/Compute/help/Add-AzVMSecret.md | 17 +-
.../Compute/help/Add-AzVMSshPublicKey.md | 17 +-
src/Compute/Compute/help/Add-AzVhd.md | 19 +-
.../help/Add-AzVmGalleryApplication.md | 17 +-
.../Add-AzVmssAdditionalUnattendContent.md | 17 +-
.../Compute/help/Add-AzVmssDataDisk.md | 17 +-
.../help/Add-AzVmssDiagnosticsExtension.md | 17 +-
.../Compute/help/Add-AzVmssExtension.md | 17 +-
.../help/Add-AzVmssGalleryApplication.md | 17 +-
...Add-AzVmssNetworkInterfaceConfiguration.md | 17 +-
.../Compute/help/Add-AzVmssRunCommand.md | 19 +-
src/Compute/Compute/help/Add-AzVmssSecret.md | 17 +-
.../Compute/help/Add-AzVmssSshPublicKey.md | 17 +-
.../Compute/help/Add-AzVmssVMDataDisk.md | 17 +-
.../Compute/help/Add-AzVmssWinRMListener.md | 17 +-
src/Compute/Compute/help/Az.Compute.md | 3 +
.../Compute/help/ConvertTo-AzVMManagedDisk.md | 17 +-
.../help/Disable-AzVMDiskEncryption.md | 17 +-
.../help/Disable-AzVmssDiskEncryption.md | 17 +-
...port-AzLogAnalyticRequestRateByInterval.md | 17 +-
.../Export-AzLogAnalyticThrottledRequest.md | 17 +-
.../Compute/help/Get-AzAvailabilitySet.md | 17 +-
.../Compute/help/Get-AzCapacityReservation.md | 17 +-
.../help/Get-AzCapacityReservationGroup.md | 19 +-
.../Compute/help/Get-AzComputeResourceSku.md | 17 +-
src/Compute/Compute/help/Get-AzDisk.md | 17 +-
src/Compute/Compute/help/Get-AzDiskAccess.md | 19 +-
.../Compute/help/Get-AzDiskEncryptionSet.md | 17 +-
...t-AzDiskEncryptionSetAssociatedResource.md | 17 +-
src/Compute/Compute/help/Get-AzGallery.md | 23 +-
.../Compute/help/Get-AzGalleryApplication.md | 21 +-
.../help/Get-AzGalleryApplicationVersion.md | 21 +-
.../help/Get-AzGalleryImageDefinition.md | 25 +-
.../Compute/help/Get-AzGalleryImageVersion.md | 25 +-
src/Compute/Compute/help/Get-AzHost.md | 19 +-
src/Compute/Compute/help/Get-AzHostGroup.md | 19 +-
src/Compute/Compute/help/Get-AzHostSize.md | 17 +-
src/Compute/Compute/help/Get-AzImage.md | 17 +-
.../help/Get-AzProximityPlacementGroup.md | 19 +-
.../Compute/help/Get-AzRemoteDesktopFile.md | 19 +-
.../Compute/help/Get-AzRestorePoint.md | 17 +-
.../help/Get-AzRestorePointCollection.md | 17 +-
src/Compute/Compute/help/Get-AzSnapshot.md | 17 +-
src/Compute/Compute/help/Get-AzSshKey.md | 19 +-
src/Compute/Compute/help/Get-AzVM.md | 23 +-
.../Compute/help/Get-AzVMADDomainExtension.md | 17 +-
.../Compute/help/Get-AzVMAEMExtension.md | 17 +-
.../Compute/help/Get-AzVMAccessExtension.md | 17 +-
.../help/Get-AzVMBootDiagnosticsData.md | 19 +-
.../Compute/help/Get-AzVMChefExtension.md | 19 +-
.../help/Get-AzVMCustomScriptExtension.md | 17 +-
.../help/Get-AzVMDiagnosticsExtension.md | 17 +-
.../help/Get-AzVMDiskEncryptionStatus.md | 17 +-
.../Compute/help/Get-AzVMDscExtension.md | 19 +-
.../help/Get-AzVMDscExtensionStatus.md | 19 +-
src/Compute/Compute/help/Get-AzVMExtension.md | 21 +-
.../Compute/help/Get-AzVMExtensionImage.md | 17 +-
.../help/Get-AzVMExtensionImageType.md | 17 +-
src/Compute/Compute/help/Get-AzVMImage.md | 19 +-
.../Compute/help/Get-AzVMImageOffer.md | 17 +-
.../Compute/help/Get-AzVMImagePublisher.md | 17 +-
src/Compute/Compute/help/Get-AzVMImageSku.md | 17 +-
.../Compute/help/Get-AzVMRunCommand.md | 17 +-
.../help/Get-AzVMRunCommandDocument.md | 17 +-
src/Compute/Compute/help/Get-AzVMSize.md | 21 +-
.../help/Get-AzVMSqlServerExtension.md | 17 +-
src/Compute/Compute/help/Get-AzVMUsage.md | 17 +-
src/Compute/Compute/help/Get-AzVmss.md | 23 +-
.../Compute/help/Get-AzVmssDiskEncryption.md | 17 +-
.../Compute/help/Get-AzVmssRollingUpgrade.md | 17 +-
src/Compute/Compute/help/Get-AzVmssSku.md | 17 +-
src/Compute/Compute/help/Get-AzVmssVM.md | 19 +-
.../help/Get-AzVmssVMDiskEncryption.md | 17 +-
.../Compute/help/Get-AzVmssVMRunCommand.md | 17 +-
.../Compute/help/Grant-AzDiskAccess.md | 17 +-
.../Compute/help/Grant-AzSnapshotAccess.md | 17 +-
.../help/Invoke-AzSpotPlacementRecommender.md | 405 ++
.../Compute/help/Invoke-AzVMInstallPatch.md | 27 +-
.../help/Invoke-AzVMPatchAssessment.md | 21 +-
.../Compute/help/Invoke-AzVMReimage.md | 17 +-
.../Compute/help/Invoke-AzVMRunCommand.md | 21 +-
.../Compute/help/Invoke-AzVmssVMRunCommand.md | 21 +-
.../Compute/help/New-AzAvailabilitySet.md | 17 +-
.../Compute/help/New-AzCapacityReservation.md | 17 +-
.../help/New-AzCapacityReservationGroup.md | 17 +-
src/Compute/Compute/help/New-AzDisk.md | 17 +-
src/Compute/Compute/help/New-AzDiskAccess.md | 17 +-
src/Compute/Compute/help/New-AzDiskConfig.md | 17 +-
.../Compute/help/New-AzDiskEncryptionSet.md | 17 +-
.../help/New-AzDiskEncryptionSetConfig.md | 17 +-
.../help/New-AzDiskPurchasePlanConfig.md | 17 +-
.../Compute/help/New-AzDiskUpdateConfig.md | 17 +-
src/Compute/Compute/help/New-AzGallery.md | 17 +-
.../Compute/help/New-AzGalleryApplication.md | 17 +-
.../help/New-AzGalleryApplicationVersion.md | 17 +-
.../help/New-AzGalleryImageDefinition.md | 17 +-
.../Compute/help/New-AzGalleryImageVersion.md | 30 +-
src/Compute/Compute/help/New-AzHost.md | 17 +-
src/Compute/Compute/help/New-AzHostGroup.md | 17 +-
src/Compute/Compute/help/New-AzImage.md | 17 +-
src/Compute/Compute/help/New-AzImageConfig.md | 17 +-
.../help/New-AzProximityPlacementGroup.md | 17 +-
.../Compute/help/New-AzRestorePoint.md | 17 +-
.../help/New-AzRestorePointCollection.md | 19 +-
src/Compute/Compute/help/New-AzSnapshot.md | 17 +-
.../Compute/help/New-AzSnapshotConfig.md | 17 +-
.../help/New-AzSnapshotUpdateConfig.md | 17 +-
src/Compute/Compute/help/New-AzSshKey.md | 17 +-
src/Compute/Compute/help/New-AzVM.md | 21 +-
src/Compute/Compute/help/New-AzVMConfig.md | 19 +-
src/Compute/Compute/help/New-AzVMDataDisk.md | 19 +-
.../help/New-AzVMSqlServerAutoBackupConfig.md | 19 +-
.../New-AzVMSqlServerAutoPatchingConfig.md | 17 +-
...w-AzVMSqlServerKeyVaultCredentialConfig.md | 17 +-
.../help/New-AzVmGalleryApplication.md | 17 +-
src/Compute/Compute/help/New-AzVmss.md | 19 +-
src/Compute/Compute/help/New-AzVmssConfig.md | 19 +-
.../help/New-AzVmssGalleryApplication.md | 17 +-
.../Compute/help/New-AzVmssIpConfig.md | 17 +-
.../Compute/help/New-AzVmssIpTagConfig.md | 17 +-
.../help/New-AzVmssVaultCertificateConfig.md | 17 +-
.../help/Publish-AzVMDscConfiguration.md | 19 +-
.../Compute/help/Remove-AzAvailabilitySet.md | 17 +-
.../help/Remove-AzCapacityReservation.md | 17 +-
.../help/Remove-AzCapacityReservationGroup.md | 21 +-
src/Compute/Compute/help/Remove-AzDisk.md | 17 +-
.../Compute/help/Remove-AzDiskAccess.md | 21 +-
.../help/Remove-AzDiskEncryptionSet.md | 21 +-
src/Compute/Compute/help/Remove-AzGallery.md | 21 +-
.../help/Remove-AzGalleryApplication.md | 19 +-
.../Remove-AzGalleryApplicationVersion.md | 19 +-
.../help/Remove-AzGalleryImageDefinition.md | 21 +-
.../help/Remove-AzGalleryImageVersion.md | 21 +-
src/Compute/Compute/help/Remove-AzHost.md | 21 +-
.../Compute/help/Remove-AzHostGroup.md | 21 +-
src/Compute/Compute/help/Remove-AzImage.md | 17 +-
.../Compute/help/Remove-AzImageDataDisk.md | 17 +-
.../help/Remove-AzProximityPlacementGroup.md | 21 +-
.../Compute/help/Remove-AzRestorePoint.md | 17 +-
.../help/Remove-AzRestorePointCollection.md | 17 +-
src/Compute/Compute/help/Remove-AzSnapshot.md | 17 +-
src/Compute/Compute/help/Remove-AzSshKey.md | 21 +-
src/Compute/Compute/help/Remove-AzVM.md | 19 +-
.../Compute/help/Remove-AzVMAEMExtension.md | 17 +-
.../help/Remove-AzVMAccessExtension.md | 17 +-
src/Compute/Compute/help/Remove-AzVMBackup.md | 17 +-
.../Compute/help/Remove-AzVMChefExtension.md | 19 +-
.../help/Remove-AzVMCustomScriptExtension.md | 17 +-
.../Compute/help/Remove-AzVMDataDisk.md | 17 +-
.../help/Remove-AzVMDiagnosticsExtension.md | 17 +-
.../Remove-AzVMDiskEncryptionExtension.md | 17 +-
.../Compute/help/Remove-AzVMDscExtension.md | 17 +-
.../Compute/help/Remove-AzVMExtension.md | 17 +-
.../help/Remove-AzVMNetworkInterface.md | 17 +-
.../Compute/help/Remove-AzVMRunCommand.md | 19 +-
src/Compute/Compute/help/Remove-AzVMSecret.md | 17 +-
.../help/Remove-AzVMSqlServerExtension.md | 17 +-
.../help/Remove-AzVmGalleryApplication.md | 17 +-
src/Compute/Compute/help/Remove-AzVmss.md | 17 +-
.../Compute/help/Remove-AzVmssDataDisk.md | 19 +-
.../help/Remove-AzVmssDiagnosticsExtension.md | 17 +-
.../Compute/help/Remove-AzVmssExtension.md | 19 +-
.../help/Remove-AzVmssGalleryApplication.md | 17 +-
...ove-AzVmssNetworkInterfaceConfiguration.md | 19 +-
.../Compute/help/Remove-AzVmssRunCommand.md | 17 +-
.../Compute/help/Remove-AzVmssVMDataDisk.md | 17 +-
.../Compute/help/Remove-AzVmssVMRunCommand.md | 19 +-
.../Repair-AzVmssServiceFabricUpdateDomain.md | 21 +-
src/Compute/Compute/help/Restart-AzHost.md | 21 +-
src/Compute/Compute/help/Restart-AzVM.md | 23 +-
src/Compute/Compute/help/Restart-AzVmss.md | 17 +-
.../Compute/help/Revoke-AzDiskAccess.md | 17 +-
.../Compute/help/Revoke-AzSnapshotAccess.md | 17 +-
src/Compute/Compute/help/Save-AzVMImage.md | 19 +-
src/Compute/Compute/help/Save-AzVhd.md | 19 +-
.../help/Set-AzDiskDiskEncryptionKey.md | 17 +-
.../Compute/help/Set-AzDiskImageReference.md | 17 +-
.../help/Set-AzDiskKeyEncryptionKey.md | 17 +-
.../Compute/help/Set-AzDiskSecurityProfile.md | 17 +-
.../help/Set-AzDiskUpdateDiskEncryptionKey.md | 17 +-
.../help/Set-AzDiskUpdateKeyEncryptionKey.md | 17 +-
src/Compute/Compute/help/Set-AzImageOsDisk.md | 17 +-
.../help/Set-AzSnapshotDiskEncryptionKey.md | 17 +-
.../help/Set-AzSnapshotImageReference.md | 17 +-
.../help/Set-AzSnapshotKeyEncryptionKey.md | 17 +-
.../Set-AzSnapshotUpdateDiskEncryptionKey.md | 17 +-
.../Set-AzSnapshotUpdateKeyEncryptionKey.md | 17 +-
src/Compute/Compute/help/Set-AzVM.md | 31 +-
.../Compute/help/Set-AzVMADDomainExtension.md | 17 +-
.../Compute/help/Set-AzVMAEMExtension.md | 17 +-
.../Compute/help/Set-AzVMAccessExtension.md | 17 +-
.../Compute/help/Set-AzVMBackupExtension.md | 17 +-
.../Compute/help/Set-AzVMBginfoExtension.md | 17 +-
.../Compute/help/Set-AzVMBootDiagnostic.md | 19 +-
.../Compute/help/Set-AzVMChefExtension.md | 19 +-
.../help/Set-AzVMCustomScriptExtension.md | 31 +-
src/Compute/Compute/help/Set-AzVMDataDisk.md | 19 +-
.../help/Set-AzVMDiagnosticsExtension.md | 17 +-
.../help/Set-AzVMDiskEncryptionExtension.md | 25 +-
.../Compute/help/Set-AzVMDscExtension.md | 17 +-
src/Compute/Compute/help/Set-AzVMExtension.md | 19 +-
src/Compute/Compute/help/Set-AzVMOSDisk.md | 25 +-
.../Compute/help/Set-AzVMOperatingSystem.md | 25 +-
src/Compute/Compute/help/Set-AzVMPlan.md | 17 +-
.../Compute/help/Set-AzVMRunCommand.md | 19 +-
.../Compute/help/Set-AzVMSecurityProfile.md | 17 +-
.../Compute/help/Set-AzVMSourceImage.md | 19 +-
.../help/Set-AzVMSqlServerExtension.md | 17 +-
src/Compute/Compute/help/Set-AzVMUefi.md | 17 +-
src/Compute/Compute/help/Set-AzVmss.md | 23 +-
.../Compute/help/Set-AzVmssBootDiagnostic.md | 17 +-
.../help/Set-AzVmssDiskEncryptionExtension.md | 17 +-
.../Set-AzVmssOrchestrationServiceState.md | 21 +-
.../Compute/help/Set-AzVmssOsProfile.md | 17 +-
.../help/Set-AzVmssRollingUpgradePolicy.md | 17 +-
.../Compute/help/Set-AzVmssSecurityProfile.md | 17 +-
.../Compute/help/Set-AzVmssStorageProfile.md | 17 +-
src/Compute/Compute/help/Set-AzVmssUefi.md | 17 +-
src/Compute/Compute/help/Set-AzVmssVM.md | 25 +-
.../Compute/help/Set-AzVmssVMRunCommand.md | 19 +-
src/Compute/Compute/help/Start-AzVM.md | 19 +-
src/Compute/Compute/help/Start-AzVmss.md | 17 +-
.../Start-AzVmssRollingExtensionUpgrade.md | 21 +-
.../help/Start-AzVmssRollingOSUpgrade.md | 17 +-
src/Compute/Compute/help/Stop-AzVM.md | 23 +-
src/Compute/Compute/help/Stop-AzVmss.md | 19 +-
.../Compute/help/Stop-AzVmssRollingUpgrade.md | 17 +-
.../Compute/help/Test-AzVMAEMExtension.md | 17 +-
.../Compute/help/Update-AzAvailabilitySet.md | 17 +-
.../help/Update-AzCapacityReservation.md | 23 +-
.../help/Update-AzCapacityReservationGroup.md | 23 +-
src/Compute/Compute/help/Update-AzDisk.md | 19 +-
.../help/Update-AzDiskEncryptionSet.md | 21 +-
src/Compute/Compute/help/Update-AzGallery.md | 21 +-
.../help/Update-AzGalleryApplication.md | 19 +-
.../Update-AzGalleryApplicationVersion.md | 19 +-
.../help/Update-AzGalleryImageDefinition.md | 21 +-
.../help/Update-AzGalleryImageVersion.md | 21 +-
src/Compute/Compute/help/Update-AzHost.md | 19 +-
src/Compute/Compute/help/Update-AzImage.md | 21 +-
.../help/Update-AzRestorePointCollection.md | 17 +-
src/Compute/Compute/help/Update-AzSnapshot.md | 19 +-
src/Compute/Compute/help/Update-AzSshKey.md | 21 +-
src/Compute/Compute/help/Update-AzVM.md | 21 +-
src/Compute/Compute/help/Update-AzVmss.md | 19 +-
.../Compute/help/Update-AzVmssInstance.md | 17 +-
src/Compute/Compute/help/Update-AzVmssVM.md | 21 +-
434 files changed, 24323 insertions(+), 1952 deletions(-)
create mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json
create mode 100644 src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md
create mode 100644 src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.json.cs
rename src/Compute/Compute.Autorest/generated/api/Models/Api10/{SystemData.PowerShell.cs => SystemDataAutoGenerated.PowerShell.cs} (67%)
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.TypeConverter.cs
rename src/Compute/Compute.Autorest/generated/api/Models/Api10/{SystemData.cs => SystemDataAutoGenerated.cs} (86%)
rename src/Compute/Compute.Autorest/generated/api/Models/Api10/{SystemData.json.cs => SystemDataAutoGenerated.json.cs} (90%)
rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.PowerShell.cs (71%)
rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.TypeConverter.cs (97%)
rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.cs (91%)
rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.json.cs (96%)
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.PowerShell.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs
rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api40}/SystemData.TypeConverter.cs (97%)
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.json.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.Completer.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.Completer.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.TypeConverter.cs
create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.cs
create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_Post.cs
create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostExpanded.cs
create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentity.cs
create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentityExpanded.cs
create mode 100644 src/Compute/Compute.Autorest/help/Invoke-AzSpotPlacementRecommender.md
create mode 100644 src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json
create mode 100644 src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1
create mode 100644 src/Compute/Compute.Autorest/utils/Get-SubscriptionIdTestSafe.ps1
create mode 100644 src/Compute/Compute/help/Invoke-AzSpotPlacementRecommender.md
diff --git a/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml b/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml
index aaedc1a0e79c..f4503b4852b0 100644
--- a/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml
+++ b/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml
@@ -32,6 +32,9 @@
+
+
+
@@ -75,6 +78,9 @@
Location
+
+ OperationId
+
ResourceGroupName
@@ -95,6 +101,562 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ProxyResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ProxyResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsList
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsOperationResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsOperationResult
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedUtc
+
+
+ Message
+
+
+ ResponseField
+
+
+ ResultStatus
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties
+
+
+
+
+
+
+
+
+
+
+
+ SupportedResourceType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ErrorDetailAutoGenerated
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ErrorDetailAutoGenerated
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScore
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScore
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AvailabilityZone
+
+
+ IsQuotaAvailable
+
+
+ Region
+
+
+ Score
+
+
+ Sku
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize
+
+
+
+
+
+
+
+
+
+
+
+ Sku
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.RunDiskInspectionInput
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.RunDiskInspectionInput
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Manifest
+
+
+ ResourceId
+
+
+ UploadSasUri
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AvailabilityZone
+
+
+ DesiredCount
+
+
+ DesiredLocation
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderResponse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AvailabilityZone
+
+
+ DesiredCount
+
+
+ DesiredLocation
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationInput
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationInput
+
+
+
+
+
+
+
+
+
+
+
+ StorageAccountId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationResponse
+
+
+
+
+
+
+
+
+
+
+
+ StorageAccountId
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20230701.InstanceViewStatus
@@ -1919,6 +2481,34 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+ Name
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange
@@ -2322,9 +2912,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceAutoGenerated
@@ -2422,9 +3012,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemDataAutoGenerated
- Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemDataAutoGenerated
diff --git a/src/Compute/Compute.Autorest/Az.Compute.psd1 b/src/Compute/Compute.Autorest/Az.Compute.psd1
index f3641cbe6b9e..d7f3d2c4f869 100644
--- a/src/Compute/Compute.Autorest/Az.Compute.psd1
+++ b/src/Compute/Compute.Autorest/Az.Compute.psd1
@@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Compute.private.dll'
FormatsToProcess = './Az.Compute.format.ps1xml'
- FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*'
+ FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'Invoke-AzSpotPlacementRecommender', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
diff --git a/src/Compute/Compute.Autorest/Az.Compute.psm1 b/src/Compute/Compute.Autorest/Az.Compute.psm1
index 051b2c02cb57..954a09bdaaa4 100644
--- a/src/Compute/Compute.Autorest/Az.Compute.psm1
+++ b/src/Compute/Compute.Autorest/Az.Compute.psm1
@@ -47,37 +47,41 @@
# Ask for the shared functionality table
$VTable = Register-AzModule
-
+
# Tweaks the pipeline on module load
$instance.OnModuleLoad = $VTable.OnModuleLoad
# Following two delegates are added for telemetry
$instance.GetTelemetryId = $VTable.GetTelemetryId
$instance.Telemetry = $VTable.Telemetry
-
+
+ # Delegate to sanitize the output object
+ $instance.SanitizeOutput = $VTable.SanitizerHandler
+
+ # Delegate to get the telemetry info
+ $instance.GetTelemetryInfo = $VTable.GetTelemetryInfo
# Tweaks the pipeline per call
$instance.OnNewRequest = $VTable.OnNewRequest
-
+
# Gets shared parameter values
$instance.GetParameterValue = $VTable.GetParameterValue
-
+
# Allows shared module to listen to events from this module
$instance.EventListener = $VTable.EventListener
-
+
# Gets shared argument completers
$instance.ArgumentCompleter = $VTable.ArgumentCompleter
-
+
# The name of the currently selected Azure profile
$instance.ProfileName = $VTable.ProfileName
-
# Load the custom module
$customModulePath = Join-Path $PSScriptRoot './custom/Az.Compute.custom.psm1'
if(Test-Path $customModulePath) {
$null = Import-Module -Name $customModulePath
}
-
+
# Export nothing to clear implicit exports
Export-ModuleMember
@@ -97,12 +101,12 @@
# Load the last folder if no profile is selected
$profileDirectory = $directories | Select-Object -Last 1
}
-
+
if($profileDirectory) {
Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
$exportsPath = $profileDirectory.FullName
}
-
+
if($exportsPath) {
Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
$cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md
index 991f1aa1566e..1191e34e1c26 100644
--- a/src/Compute/Compute.Autorest/README.md
+++ b/src/Compute/Compute.Autorest/README.md
@@ -26,7 +26,7 @@ For information on how to develop for `Az.Compute`, see [how-to.md](how-to.md).
### AutoRest Configuration
> see https://aka.ms/autorest
``` yaml
-commit: 1a925d1afe288a5f20d078bbc89214a36a0e4287
+commit: 77c47a7fba8d8b900595966b81d6bb92a0308370
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
@@ -35,6 +35,7 @@ input-file:
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2022-01-03/gallery.json
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-07-01/runCommand.json
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json
+ - $(repo)/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/preview/2024-03-01-preview/diagnostic.json
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
module-version: 0.3.0
# Normally, title is the service name
@@ -232,4 +233,33 @@ directive:
subject: VMRunCommand|VmssVMRunCommand
verb: Get
remove: true
+ ### Remove All Diagnostic cmdlets aside from Invoke Spot Placement Recommender - generate ONLY SpotPlacementRecommender cmdlets
+ - where:
+ verb: Get
+ subject: Diagnostic
+ remove: true
+ - where:
+ verb: Get
+ subject: DiskInspection
+ remove: true
+ - where:
+ verb: New
+ subject: DiskInspection
+ remove: true
+ - where:
+ verb: Read
+ subject: DiagnosticOperation
+ remove: true
+ - where:
+ verb: Register
+ subject: DiskInspectionStorageConfiguration
+ remove: true
+ - where:
+ verb: Test
+ subject: DiskInspectionStorageConfiguration
+ remove: true
+ - where:
+ verb: Get
+ subject: SpotPlacementRecommender
+ remove: true
```
diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json
new file mode 100644
index 000000000000..da311989216d
--- /dev/null
+++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json
@@ -0,0 +1,42 @@
+{
+ "resourceType": "locations",
+ "apiVersion": "2024-03-01-preview",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.compute"
+ },
+ "commands": [
+ {
+ "name": "Invoke-AzSpotPlacementRecommender",
+ "description": "Generates placement scores for Spot VM skus.",
+ "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-Location ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Generates placement scores for Spot VM skus.",
+ "parameters": [
+ {
+ "name": "-Location",
+ "value": "[Path.location]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md
new file mode 100644
index 000000000000..2ed3d44b2433
--- /dev/null
+++ b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md
@@ -0,0 +1,153 @@
+### Example 1: Regionally scoped Spot Placement Recommender scores
+```powershell
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes
+$response.PlacementScore
+```
+
+```output
+AvailabilityZone IsQuotaAvailable Region Score Sku
+---------------- ---------------- ------ ----- ---
+ True japaneast RestrictedSkuNotAvailable Standard_D2_v3
+ True japaneast RestrictedSkuNotAvailable Standard_D2_v2
+ True japaneast RestrictedSkuNotAvailable Standard_D4_v3
+ True southcentralus High Standard_D2_v3
+ True southcentralus High Standard_D2_v2
+ True southcentralus High Standard_D4_v3
+ True centralus RestrictedSkuNotAvailable Standard_D2_v3
+ True centralus RestrictedSkuNotAvailable Standard_D2_v2
+ True centralus RestrictedSkuNotAvailable Standard_D4_v3
+```
+
+Returns regionally scoped spot placement recommender scores for the input.
+
+### Example 2: Zonally scoped Spot Placement Recommender scores
+```powershell
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone
+$response.PlacementScore
+```
+
+```output
+AvailabilityZone IsQuotaAvailable Region Score Sku
+---------------- ---------------- ------ ----- ---
+1 True japaneast High Standard_D2_v3
+2 True japaneast High Standard_D2_v3
+3 True japaneast High Standard_D2_v3
+1 True japaneast High Standard_D2_v2
+2 True japaneast High Standard_D2_v2
+3 True japaneast High Standard_D2_v2
+1 True japaneast High Standard_D4_v3
+2 True japaneast High Standard_D4_v3
+3 True japaneast High Standard_D4_v3
+1 True southcentralus High Standard_D2_v3
+2 True southcentralus High Standard_D2_v3
+3 True southcentralus High Standard_D2_v3
+1 True southcentralus High Standard_D2_v2
+2 True southcentralus High Standard_D2_v2
+3 True southcentralus High Standard_D2_v2
+1 True southcentralus High Standard_D4_v3
+2 True southcentralus High Standard_D4_v3
+3 True southcentralus High Standard_D4_v3
+1 True centralus DataNotFoundOrStale Standard_D2_v3
+2 True centralus High Standard_D2_v3
+3 True centralus High Standard_D2_v3
+1 True centralus DataNotFoundOrStale Standard_D2_v2
+2 True centralus High Standard_D2_v2
+3 True centralus High Standard_D2_v2
+1 True centralus DataNotFoundOrStale Standard_D4_v3
+2 True centralus High Standard_D4_v3
+3 True centralus High Standard_D4_v3
+```
+
+Returns zonally scoped spot placement recommender scores for the input.
+
+### Example 3: Regionally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument
+```powershell
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+$desiredCount = 1
+
+$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false}
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
+$response.PlacementScore
+```
+
+```output
+AvailabilityZone IsQuotaAvailable Region Score Sku
+---------------- ---------------- ------ ----- ---
+ True japaneast RestrictedSkuNotAvailable Standard_D2_v3
+ True japaneast RestrictedSkuNotAvailable Standard_D2_v2
+ True japaneast RestrictedSkuNotAvailable Standard_D4_v3
+ True southcentralus High Standard_D2_v3
+ True southcentralus High Standard_D2_v2
+ True southcentralus High Standard_D4_v3
+ True centralus RestrictedSkuNotAvailable Standard_D2_v3
+ True centralus RestrictedSkuNotAvailable Standard_D2_v2
+ True centralus RestrictedSkuNotAvailable Standard_D4_v3
+```
+
+Returns regionally scoped spot placement recommender scores for the input.
+
+### Example 2: Zonally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument
+```powershell
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+$desiredCount = 1
+
+$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true}
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
+$response.PlacementScore
+```
+
+```output
+AvailabilityZone IsQuotaAvailable Region Score Sku
+---------------- ---------------- ------ ----- ---
+1 True japaneast High Standard_D2_v3
+2 True japaneast High Standard_D2_v3
+3 True japaneast High Standard_D2_v3
+1 True japaneast High Standard_D2_v2
+2 True japaneast High Standard_D2_v2
+3 True japaneast High Standard_D2_v2
+1 True japaneast High Standard_D4_v3
+2 True japaneast High Standard_D4_v3
+3 True japaneast High Standard_D4_v3
+1 True southcentralus High Standard_D2_v3
+2 True southcentralus High Standard_D2_v3
+3 True southcentralus High Standard_D2_v3
+1 True southcentralus High Standard_D2_v2
+2 True southcentralus High Standard_D2_v2
+3 True southcentralus High Standard_D2_v2
+1 True southcentralus High Standard_D4_v3
+2 True southcentralus High Standard_D4_v3
+3 True southcentralus High Standard_D4_v3
+1 True centralus High Standard_D2_v3
+2 True centralus High Standard_D2_v3
+3 True centralus High Standard_D2_v3
+1 True centralus High Standard_D2_v2
+2 True centralus High Standard_D2_v2
+3 True centralus High Standard_D2_v2
+1 True centralus High Standard_D4_v3
+2 True centralus High Standard_D4_v3
+3 True centralus High Standard_D4_v3
+```
+
+Returns zonally scoped spot placement recommender scores for the input.
\ No newline at end of file
diff --git a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1
index 3063550ed80d..a4dbcc004418 100644
--- a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1
+++ b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1
@@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -172,7 +173,13 @@ begin {
List = 'Az.Compute.private\Get-AzGalleryApplication_List';
}
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1
index 565e1406705e..7b474d8e8d98 100644
--- a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1
+++ b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1
@@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -187,7 +188,13 @@ begin {
List = 'Az.Compute.private\Get-AzGalleryApplicationVersion_List';
}
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1 b/src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1
new file mode 100644
index 000000000000..a1c87d5e8cc4
--- /dev/null
+++ b/src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1
@@ -0,0 +1,309 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Generates placement scores for Spot VM skus.
+.Description
+Generates placement scores for Spot VM skus.
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes
+$response.PlacementScore
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone
+$response.PlacementScore
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+$desiredCount = 1
+
+$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false}
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
+$response.PlacementScore
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+$desiredCount = 1
+
+$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true}
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
+$response.PlacementScore
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+DESIREDSIZE : The desired resource SKUs.
+ [Sku ]: The resource's CRP virtual machine SKU size.
+
+INPUTOBJECT : Identity Parameter
+ [CommandId ]: The command id.
+ [GalleryApplicationName ]: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
+ [GalleryApplicationVersionName ]: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..
+ [GalleryImageName ]: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
+ [GalleryImageVersionName ]: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..
+ [GalleryName ]: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters.
+ [Id ]: Resource identity path
+ [InstanceId ]: The instance ID of the virtual machine.
+ [Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
+ [ResourceGroupName ]: The name of the resource group.
+ [RunCommandName ]: The name of the virtual machine run command.
+ [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ [VMName ]: The name of the virtual machine where the run command should be created or updated.
+ [VMScaleSetName ]: The name of the VM scale set.
+
+SPOTPLACEMENTRECOMMENDERINPUT : SpotPlacementRecommender API Input.
+ [AvailabilityZone ]: Defines if the scope is zonal or regional.
+ [DesiredCount ]: Desired instance count per region/zone based on the scope.
+ [DesiredLocation ]: The desired regions
+ [DesiredSize ]: The desired resource SKUs.
+ [Sku ]: The resource's CRP virtual machine SKU size.
+.Link
+https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender
+#>
+function Invoke-AzSpotPlacementRecommender {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse])]
+[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Post', Mandatory)]
+ [Parameter(ParameterSetName='PostExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
+ [System.String]
+ # The name of the Azure region.
+ ${Location},
+
+ [Parameter(ParameterSetName='Post')]
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Subscription credentials which uniquely identify Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput]
+ # SpotPlacementRecommender API Input.
+ # To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table.
+ ${SpotPlacementRecommenderInput},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Defines if the scope is zonal or regional.
+ ${AvailabilityZone},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [System.Int32]
+ # Desired instance count per region/zone based on the scope.
+ ${DesiredCount},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [System.String[]]
+ # The desired regions
+ ${DesiredLocation},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]]
+ # The desired resource SKUs.
+ # To construct, see NOTES section for DESIREDSIZE properties and create a hash table.
+ ${DesiredSize},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Post = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_Post';
+ PostExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostExpanded';
+ PostViaIdentity = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentity';
+ PostViaIdentityExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentityExpanded';
+ }
+ if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1
index 08656c4da937..c47d3650d00d 100644
--- a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1
+++ b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1
@@ -183,7 +183,13 @@ begin {
__AllParameterSets = 'Az.Compute.custom\New-AzGalleryApplication';
}
if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1
index 42f8d76fb65b..c4515275fc2a 100644
--- a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1
+++ b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1
@@ -278,7 +278,13 @@ begin {
CreateExpanded = 'Az.Compute.custom\New-AzGalleryApplicationVersion';
}
if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1
index 3ace79a90357..58cf0d99c0a6 100644
--- a/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -187,7 +188,13 @@ begin {
List = 'Az.Compute.private\Get-AzGalleryApplicationVersion_List';
}
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -268,6 +275,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -397,7 +405,307 @@ begin {
List = 'Az.Compute.private\Get-AzGalleryApplication_List';
}
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Generates placement scores for Spot VM skus.
+.Description
+Generates placement scores for Spot VM skus.
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes
+$response.PlacementScore
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone
+$response.PlacementScore
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+$desiredCount = 1
+
+$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false}
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
+$response.PlacementScore
+.Example
+$resourceSku1 = @{sku = "Standard_D2_v3"}
+$resourceSku2 = @{sku = "Standard_D2_v2"}
+$resourceSku3 = @{sku = "Standard_D4_v3"}
+$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
+$desiredLocations = 'japaneast','southcentralus','centralus'
+$desiredCount = 1
+
+$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true}
+
+$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
+$response.PlacementScore
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+DESIREDSIZE : The desired resource SKUs.
+ [Sku ]: The resource's CRP virtual machine SKU size.
+
+INPUTOBJECT : Identity Parameter
+ [CommandId ]: The command id.
+ [GalleryApplicationName ]: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
+ [GalleryApplicationVersionName ]: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..
+ [GalleryImageName ]: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
+ [GalleryImageVersionName ]: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..
+ [GalleryName ]: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters.
+ [Id ]: Resource identity path
+ [InstanceId ]: The instance ID of the virtual machine.
+ [Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
+ [ResourceGroupName ]: The name of the resource group.
+ [RunCommandName ]: The name of the virtual machine run command.
+ [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ [VMName ]: The name of the virtual machine where the run command should be created or updated.
+ [VMScaleSetName ]: The name of the VM scale set.
+
+SPOTPLACEMENTRECOMMENDERINPUT : SpotPlacementRecommender API Input.
+ [AvailabilityZone ]: Defines if the scope is zonal or regional.
+ [DesiredCount ]: Desired instance count per region/zone based on the scope.
+ [DesiredLocation ]: The desired regions
+ [DesiredSize ]: The desired resource SKUs.
+ [Sku ]: The resource's CRP virtual machine SKU size.
+.Link
+https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender
+#>
+function Invoke-AzSpotPlacementRecommender {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse])]
+[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Post', Mandatory)]
+ [Parameter(ParameterSetName='PostExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
+ [System.String]
+ # The name of the Azure region.
+ ${Location},
+
+ [Parameter(ParameterSetName='Post')]
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Subscription credentials which uniquely identify Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput]
+ # SpotPlacementRecommender API Input.
+ # To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table.
+ ${SpotPlacementRecommenderInput},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Defines if the scope is zonal or regional.
+ ${AvailabilityZone},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [System.Int32]
+ # Desired instance count per region/zone based on the scope.
+ ${DesiredCount},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [System.String[]]
+ # The desired regions
+ ${DesiredLocation},
+
+ [Parameter(ParameterSetName='PostExpanded')]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]]
+ # The desired resource SKUs.
+ # To construct, see NOTES section for DESIREDSIZE properties and create a hash table.
+ ${DesiredSize},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Compute.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Post = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_Post';
+ PostExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostExpanded';
+ PostViaIdentity = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentity';
+ PostViaIdentityExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentityExpanded';
+ }
+ if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -476,6 +784,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -625,7 +934,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -704,6 +1019,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -847,7 +1163,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplication_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -926,6 +1248,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -1068,7 +1391,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzVMRunCommand_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -1147,6 +1476,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -1295,7 +1625,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzVmssVMRunCommand_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -1648,7 +1984,13 @@ begin {
ScriptLocalPath = 'Az.Compute.custom\Set-AzVMRunCommand_ScriptLocalPath';
}
if (('UpdateExpanded', 'ScriptLocalPath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -2007,7 +2349,13 @@ begin {
ScriptLocalPath = 'Az.Compute.custom\Set-AzVmssVMRunCommand_ScriptLocalPath';
}
if (('UpdateExpanded', 'ScriptLocalPath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -2086,6 +2434,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -2239,7 +2588,13 @@ begin {
UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplication_UpdateViaIdentityExpanded';
}
if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -2460,7 +2815,13 @@ begin {
__AllParameterSets = 'Az.Compute.custom\New-AzGalleryApplication';
}
if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -2776,7 +3137,13 @@ begin {
CreateExpanded = 'Az.Compute.custom\New-AzGalleryApplicationVersion';
}
if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -2861,6 +3228,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -3069,7 +3437,13 @@ begin {
UpdateViaIdentityExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion';
}
if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1
index 5bfdaef3bdd8..f6fd4aa2f0ae 100644
--- a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1
+++ b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1
@@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -184,7 +185,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplication_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1
index a33dfb3337e4..f5dba4446caf 100644
--- a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1
+++ b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1
@@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -190,7 +191,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1
index 6370946cc705..f46c594dab71 100644
--- a/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1
+++ b/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1
@@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -183,7 +184,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzVMRunCommand_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1
index 01bd0642ac23..04d7ffe35ac6 100644
--- a/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1
+++ b/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1
@@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -189,7 +190,13 @@ begin {
DeleteViaIdentity = 'Az.Compute.private\Remove-AzVmssVMRunCommand_DeleteViaIdentity';
}
if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1
index 7fafb658d7e7..9ca0f205a0cf 100644
--- a/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1
+++ b/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1
@@ -315,7 +315,13 @@ begin {
ScriptLocalPath = 'Az.Compute.custom\Set-AzVMRunCommand_ScriptLocalPath';
}
if (('UpdateExpanded', 'ScriptLocalPath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1
index 990e4b684328..fef6243541a1 100644
--- a/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1
+++ b/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1
@@ -321,7 +321,13 @@ begin {
ScriptLocalPath = 'Az.Compute.custom\Set-AzVmssVMRunCommand_ScriptLocalPath';
}
if (('UpdateExpanded', 'ScriptLocalPath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1
index 18c041374f3c..1e50fd682d6a 100644
--- a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1
+++ b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1
@@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -194,7 +195,13 @@ begin {
UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplication_UpdateViaIdentityExpanded';
}
if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1
index 69999a89d997..cc902da3c99d 100644
--- a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1
+++ b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1
@@ -47,6 +47,7 @@ INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[InstanceId ]: The instance ID of the virtual machine.
[Location ]: The location upon which run commands is queried.
+ [OperationId ]: The ID of an ongoing async operation.
[ResourceGroupName ]: The name of the resource group.
[RunCommandName ]: The name of the virtual machine run command.
[SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
@@ -255,7 +256,13 @@ begin {
UpdateViaIdentityExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion';
}
if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
diff --git a/src/Compute/Compute.Autorest/generated/Module.cs b/src/Compute/Compute.Autorest/generated/Module.cs
index 0ceba6e9bb36..a1d2a25f8961 100644
--- a/src/Compute/Compute.Autorest/generated/Module.cs
+++ b/src/Compute/Compute.Autorest/generated/Module.cs
@@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute
using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>;
using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>;
using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+ using SanitizerDelegate = global::System.Action