diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index ad768dfc325f..8a1485c7efa0 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -19,6 +19,7 @@ ---> ## Upcoming Release +* Fixed the incorrect type of `-TotalBytesPerSession` in `New-AzNetworkWatcherPacketCapture` ## Version 5.3.0 * Added samples for retrieving Private Link IP Configuration using 'New-AzApplicationGatewayPrivateLinkIpConfiguration' with fix [#20440] diff --git a/src/Network/Network/Models/PSGetPacketCaptureResult.cs b/src/Network/Network/Models/PSGetPacketCaptureResult.cs index 308b63ed5f49..a1b31a34eb6d 100644 --- a/src/Network/Network/Models/PSGetPacketCaptureResult.cs +++ b/src/Network/Network/Models/PSGetPacketCaptureResult.cs @@ -37,7 +37,7 @@ public class PSGetPacketCaptureResult : PSChildResource public int? BytesToCapturePerPacket { get; set; } [Ps1Xml(Target = ViewControl.Table)] - public int? TotalBytesPerSession { get; set; } + public uint? TotalBytesPerSession { get; set; } [Ps1Xml(Target = ViewControl.Table)] public int? TimeLimitInSeconds { get; set; } diff --git a/src/Network/Network/Models/PSPacketCaptureResult.cs b/src/Network/Network/Models/PSPacketCaptureResult.cs index 3beef7473e01..08acdce6e33e 100644 --- a/src/Network/Network/Models/PSPacketCaptureResult.cs +++ b/src/Network/Network/Models/PSPacketCaptureResult.cs @@ -35,7 +35,7 @@ public class PSPacketCaptureResult : PSChildResource public int? BytesToCapturePerPacket { get; set; } [Ps1Xml(Target = ViewControl.Table)] - public int? TotalBytesPerSession { get; set; } + public uint? TotalBytesPerSession { get; set; } [Ps1Xml(Target = ViewControl.Table)] public int? TimeLimitInSeconds { get; set; } diff --git a/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommand.cs b/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommand.cs index c6c8e776ec37..7ec5df659cca 100644 --- a/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommand.cs +++ b/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommand.cs @@ -111,8 +111,8 @@ public class NewAzureNetworkWatcherPacketCaptureCommand : PacketCaptureBaseCmdle ValueFromPipelineByPropertyName = true, HelpMessage = "Total bytes per session.")] [ValidateNotNull] - [ValidateRange(1, int.MaxValue)] - public int? TotalBytesPerSession { get; set; } + [ValidateRange(1, uint.MaxValue)] + public uint? TotalBytesPerSession { get; set; } [Parameter( Mandatory = false, diff --git a/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommandV2.cs b/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommandV2.cs index 1b51de6d4dac..21e5dec2ab38 100644 --- a/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommandV2.cs +++ b/src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommandV2.cs @@ -111,8 +111,8 @@ public class NewAzureNetworkWatcherPacketCaptureCommandV2 : PacketCaptureBaseCmd ValueFromPipelineByPropertyName = true, HelpMessage = "Total bytes per session.")] [ValidateNotNull] - [ValidateRange(1, int.MaxValue)] - public int? TotalBytesPerSession { get; set; } + [ValidateRange(1, uint.MaxValue)] + public uint? TotalBytesPerSession { get; set; } [Parameter( Mandatory = false, diff --git a/tools/StaticAnalysis/Exceptions/Az.Network/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Network/BreakingChangeIssues.csv index 725aa20cd928..2a622419c3be 100644 --- a/tools/StaticAnalysis/Exceptions/Az.Network/BreakingChangeIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.Network/BreakingChangeIssues.csv @@ -3,3 +3,8 @@ "Az.Network","Microsoft.Azure.Commands.Network.Automation.GetAzureRmDdosProtectionPlan","Get-AzDdosProtectionPlan","0","3010","The property 'PublicIpAddressesText' of type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan' has been removed.","Add the property 'PublicIpAddressesText' back to type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan'." "Az.Network","Microsoft.Azure.Commands.Network.NewAzureRmDdosProtectionPlan","New-AzDdosProtectionPlan","0","3010","The property 'PublicIpAddresses' of type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan' has been removed.","Add the property 'PublicIpAddresses' back to type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan'." "Az.Network","Microsoft.Azure.Commands.Network.NewAzureRmDdosProtectionPlan","New-AzDdosProtectionPlan","0","3010","The property 'PublicIpAddressesText' of type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan' has been removed.","Add the property 'PublicIpAddressesText' back to type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan'." +"Az.Network","Microsoft.Azure.Commands.Network.GetAzureNetworkWatcherPacketCaptureCommand","Get-AzNetworkWatcherPacketCapture","0","3030","The generic type for 'property TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'property TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'." +"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommand","New-AzNetworkWatcherPacketCapture","0","3030","The generic type for 'property TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'property TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'." +"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommand","New-AzNetworkWatcherPacketCapture","0","3030","The generic type for 'parameter TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'parameter TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'." +"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommandV2","New-AzNetworkWatcherPacketCaptureV2","0","3030","The generic type for 'property TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'property TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'." +"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommandV2","New-AzNetworkWatcherPacketCaptureV2","0","3030","The generic type for 'parameter TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'parameter TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'."