Skip to content

Commit 93137b9

Browse files
grizzlytheodoreTheodore Chang
andauthored
Get-AzVmss bug fix (#24781)
* fix bug (breaking change) * breaking change suppression --------- Co-authored-by: Theodore Chang <[email protected]>
1 parent aa954bd commit 93137b9

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Added cmdlet `Invoke-AzSpotPlacementRecommender`.
2626
* Fixed `Update-AzCapacityReservationGroup` to remove Subscriptions from SharingProfile.
2727
* Added new optional parameter `SecureVMGuestStateSAS` to cmdlet `Grant-AzDiskAccess`.
28+
* [Breaking Change] Added ValidateNotNullOrEmpty for `-ResourceGroupName` and `-VMScaleSetName` parameters to `Get-AzVmss` cmdlet. [#20095]
2829

2930
## Version 7.2.0
3031
* Added parameters `-scriptUriManagedIdentity`, `-outputBlobManagedIdentity`, `-errorBlobMangedIdentity`, and `-TreatFailureAsDeploymentFailure` to cmdlets `Set-AzVmRunCommand` and `Set-AzVmssRunCommand`.

src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetMethod.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
namespace Microsoft.Azure.Commands.Compute.Automation
3636
{
37-
[GenericBreakingChangeWithVersionAttribute("Starting in May 2024 the \"Get-AzVmss\" cmdlet will no longer allow an empty value for resource group name and virtual machine scale set name.", "12.0.0", "8.0.0")]
3837
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Vmss", DefaultParameterSetName = "DefaultParameter")]
3938
[OutputType(typeof(PSVirtualMachineScaleSet))]
4039
public partial class GetAzureRmVmss : ComputeAutomationBaseCmdlet
@@ -168,6 +167,7 @@ public override void ExecuteCmdlet()
168167
ValueFromPipelineByPropertyName = true)]
169168
[ResourceGroupCompleter]
170169
[SupportsWildcards]
170+
[ValidateNotNullOrEmpty]
171171
public string ResourceGroupName { get; set; }
172172

173173
[Parameter(
@@ -184,6 +184,7 @@ public override void ExecuteCmdlet()
184184
ValueFromPipelineByPropertyName = true)]
185185
[ResourceNameCompleter("Microsoft.Compute/virtualMachineScaleSets", "ResourceGroupName")]
186186
[SupportsWildcards]
187+
[ValidateNotNullOrEmpty]
187188
[Alias("Name")]
188189
public string VMScaleSetName { get; set; }
189190

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"Module","ClassName","Target","Severity","ProblemId","Description","Remediation"
2+
"Az.Compute","Microsoft.Azure.Commands.Compute.Automation.GetAzureRmVmss","Get-AzVmss","0","2090","The ValidateNotNullOrEmpty attribute has been added to parameter 'ResourceGroupName' for cmdlet 'Get-AzVmss'.","Remove the ValidateNotNullOrEmpty attribute from parameter 'ResourceGroupName'."
3+
"Az.Compute","Microsoft.Azure.Commands.Compute.Automation.GetAzureRmVmss","Get-AzVmss","0","2090","The ValidateNotNullOrEmpty attribute has been added to parameter 'VMScaleSetName' for cmdlet 'Get-AzVmss'.","Remove the ValidateNotNullOrEmpty attribute from parameter 'VMScaleSetName'."

0 commit comments

Comments
 (0)