diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 693fedb157d5..80c7790b7851 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -27,6 +27,9 @@ - Added parameter -SkuTier - Added parameter -SkuName and made Sku as Alias for this - Removed parameter -Sku +* Updated ExpressRouteConnection: + - Added parameter `-ExpressRouteGatewayBypass` in `New-AzExpressRouteConnection` + - Added parameter `-ExpressRouteGatewayBypass` in `Set-AzExpressRouteConnection` ## Version 3.5.0 * Added Office365 Policy to VPNSite Resource diff --git a/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/NewAzureRmExpressRouteConnectionCommand.cs b/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/NewAzureRmExpressRouteConnectionCommand.cs index 7ab2f89f5849..786cde7a03fb 100644 --- a/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/NewAzureRmExpressRouteConnectionCommand.cs +++ b/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/NewAzureRmExpressRouteConnectionCommand.cs @@ -91,6 +91,11 @@ public class NewAzureRmExpressRouteConnectionCommand : ExpressRouteConnectionBas HelpMessage = "Enable internet security for this ExpressRoute Gateway connection")] public SwitchParameter EnableInternetSecurity { get; set; } + [Parameter( + Mandatory = false, + HelpMessage = "Bypass ExpressRoute Gateway for this ExpressRoute Gateway connection")] + public SwitchParameter ExpressRouteGatewayBypass { get; set; } + [Parameter( Mandatory = false, HelpMessage = "The routing configuration for this ExpressRoute Gateway connection")] @@ -150,7 +155,8 @@ private PSExpressRouteConnection CreateExpressRouteConnection() { Name = this.Name, ExpressRouteCircuitPeering = peeringResourceId, - EnableInternetSecurity = this.EnableInternetSecurity.IsPresent + EnableInternetSecurity = this.EnableInternetSecurity.IsPresent, + ExpressRouteGatewayBypass = this.ExpressRouteGatewayBypass.IsPresent }; if (this.RoutingConfiguration != null) diff --git a/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/SetAzureRmExpressRouteConnectionCommand.cs b/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/SetAzureRmExpressRouteConnectionCommand.cs index efa2844231e7..edccca65d0c2 100644 --- a/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/SetAzureRmExpressRouteConnectionCommand.cs +++ b/src/Network/Network/Cortex/ExpressRouteGateway/ExpressRouteConnection/SetAzureRmExpressRouteConnectionCommand.cs @@ -91,6 +91,11 @@ public class UpdateAzureRmExpressRouteConnectionCommand : ExpressRouteConnection HelpMessage = "Enable internet security for this connection")] public bool? EnableInternetSecurity { get; set; } + [Parameter( + Mandatory = false, + HelpMessage = "Bypass ExpressRoute Gateway for this connection")] + public bool? ExpressRouteGatewayBypass { get; set; } + [Parameter( Mandatory = false, HelpMessage = "The routing configuration for this ExpressRoute Gateway connection")] @@ -155,6 +160,11 @@ public override void Execute() expressRouteConnectionToModify.EnableInternetSecurity = this.EnableInternetSecurity.Value; } + if (this.ExpressRouteGatewayBypass.HasValue) + { + expressRouteConnectionToModify.ExpressRouteGatewayBypass = this.ExpressRouteGatewayBypass.Value; + } + if (this.RoutingConfiguration != null) { if (this.RoutingConfiguration.VnetRoutes != null && this.RoutingConfiguration.VnetRoutes.StaticRoutes != null && this.RoutingConfiguration.VnetRoutes.StaticRoutes.Any()) diff --git a/src/Network/Network/Models/Cortex/PSExpressRouteConnection.cs b/src/Network/Network/Models/Cortex/PSExpressRouteConnection.cs index 8c7a22d89639..8690f90bfa11 100644 --- a/src/Network/Network/Models/Cortex/PSExpressRouteConnection.cs +++ b/src/Network/Network/Models/Cortex/PSExpressRouteConnection.cs @@ -31,6 +31,9 @@ public class PSExpressRouteConnection : PSChildResource [Ps1Xml(Label = "Internet Security Enabled", Target = ViewControl.Table)] public bool EnableInternetSecurity { get; set; } + [Ps1Xml(Label = "ExpressRoute GatewayBypass Enabled", Target = ViewControl.Table)] + public bool ExpressRouteGatewayBypass { get; set; } + public PSRoutingConfiguration RoutingConfiguration { get; set; } [Ps1Xml(Label = "Provisioning State", Target = ViewControl.Table)] diff --git a/src/Network/Network/Network.format.ps1xml b/src/Network/Network/Network.format.ps1xml index e004916ee57d..35313e1579ff 100644 --- a/src/Network/Network/Network.format.ps1xml +++ b/src/Network/Network/Network.format.ps1xml @@ -4853,6 +4853,10 @@ EnableInternetSecurity + + + ExpressRouteGatewayBypass + ProvisioningState diff --git a/src/Network/Network/help/Get-AzExpressRouteConnection.md b/src/Network/Network/help/Get-AzExpressRouteConnection.md index 1d85f01a3a97..d7c333f5b2bf 100644 --- a/src/Network/Network/help/Get-AzExpressRouteConnection.md +++ b/src/Network/Network/help/Get-AzExpressRouteConnection.md @@ -58,6 +58,7 @@ Name : testConnection Etag : W/"00000000-0000-0000-0000-000000000000" Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw/expressRouteConnections/testConnection EnableInternetSecurity : False +ExpressRouteGatewayBypass : False RoutingConfiguration : { "AssociatedRouteTable": { "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable" @@ -96,6 +97,7 @@ Name : testConnection1 Etag : W/"00000000-0000-0000-0000-000000000000" Id : /subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw/expressRouteConnections/testConnection1 EnableInternetSecurity : False +ExpressRouteGatewayBypass : False RoutingConfiguration : { "AssociatedRouteTable": { "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable" @@ -121,6 +123,7 @@ Name : testConnection2 Etag : W/"00000000-0000-0000-0000-000000000000" Id : /subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw/expressRouteConnections/testConnection2 EnableInternetSecurity : False +ExpressRouteGatewayBypass : False RoutingConfiguration : { "AssociatedRouteTable": { "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable" @@ -246,4 +249,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -## RELATED LINKS +## RELATED LINKS \ No newline at end of file diff --git a/src/Network/Network/help/New-AzExpressRouteConnection.md b/src/Network/Network/help/New-AzExpressRouteConnection.md index 4806b2ac5a6b..cf3a4ca78587 100644 --- a/src/Network/Network/help/New-AzExpressRouteConnection.md +++ b/src/Network/Network/help/New-AzExpressRouteConnection.md @@ -16,20 +16,24 @@ Creates an ExpressRoute connection that connects an ExpressRoute gateway to an o ``` New-AzExpressRouteConnection -ResourceGroupName -ExpressRouteGatewayName -Name -ExpressRouteCircuitPeeringId [-AuthorizationKey ] [-RoutingWeight ] - [-EnableInternetSecurity] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-EnableInternetSecurity] [-ExpressRouteGatewayBypass] [-RoutingConfiguration ] + [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByExpressRouteGatewayObject ``` New-AzExpressRouteConnection -ExpressRouteGatewayObject -Name -ExpressRouteCircuitPeeringId [-AuthorizationKey ] [-RoutingWeight ] - [-EnableInternetSecurity] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-EnableInternetSecurity] [-ExpressRouteGatewayBypass] [-RoutingConfiguration ] + [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByExpressRouteGatewayResourceId ``` New-AzExpressRouteConnection -ParentResourceId -Name -ExpressRouteCircuitPeeringId - [-AuthorizationKey ] [-RoutingWeight ] [-EnableInternetSecurity] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-AuthorizationKey ] [-RoutingWeight ] [-EnableInternetSecurity] [-ExpressRouteGatewayBypass] + [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -155,6 +159,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ExpressRouteGatewayBypass +Bypass ExpressRoute Gateway for this ExpressRoute Gateway connection + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ExpressRouteGatewayName The resource group name. diff --git a/src/Network/Network/help/Set-AzExpressRouteConnection.md b/src/Network/Network/help/Set-AzExpressRouteConnection.md index 2e2cde27e645..0f35ec4df75f 100644 --- a/src/Network/Network/help/Set-AzExpressRouteConnection.md +++ b/src/Network/Network/help/Set-AzExpressRouteConnection.md @@ -15,20 +15,20 @@ Updates an express route connection created between an express route gateway and ### ByExpressRouteConnectionName (Default) ``` Set-AzExpressRouteConnection -ResourceGroupName -ExpressRouteGatewayName -Name - [-AuthorizationKey ] [-RoutingWeight ] [-EnableInternetSecurity] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] + [-AuthorizationKey ] [-RoutingWeight ] [-EnableInternetSecurity] [-ExpressRouteGatewayBypass] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByExpressRouteConnectionResourceId ``` Set-AzExpressRouteConnection -ResourceId [-AuthorizationKey ] [-RoutingWeight ] - [-EnableInternetSecurity] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-EnableInternetSecurity] [-ExpressRouteGatewayBypass] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByExpressRouteConnectionObject ``` Set-AzExpressRouteConnection -InputObject [-AuthorizationKey ] - [-RoutingWeight ] [-EnableInternetSecurity] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-RoutingWeight ] [-EnableInternetSecurity] [-ExpressRouteGatewayBypass] [-RoutingConfiguration ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -145,6 +145,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ExpressRouteGatewayBypass +Bypass ExpressRoute Gateway for this ExpressRoute Gateway connection + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ExpressRouteGatewayName The parent resource name. @@ -298,4 +313,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[New-AzRoutingConfiguration](./New-AzRoutingConfiguration.md) +[New-AzRoutingConfiguration](./New-AzRoutingConfiguration.md) \ No newline at end of file diff --git a/tools/StaticAnalysis/Exceptions/Az.Network/SignatureIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Network/SignatureIssues.csv index db55cacfbe34..62bb8962e818 100644 --- a/tools/StaticAnalysis/Exceptions/Az.Network/SignatureIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.Network/SignatureIssues.csv @@ -372,3 +372,5 @@ "Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.Bastion.GetAzBastionCommand","Get-AzBastion","1","8700","Parameter set 'ListByResourceGroupName', '__AllParameterSets' of cmdlet 'Get-AzBastion' have the same mandatory parameters, and both of them are not default parameter set which may cause confusion.","Merge these parameter sets into one parameter set." "Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.NewAzureRmExpressRoutePortLOA","New-AzExpressRoutePortLOA","1","8100","New-AzExpressRoutePortLOA Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" "Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.NewAzureRmO365PolicyPropertyCommand","New-AzO365PolicyProperty","1","8100","New-AzO365PolicyProperty Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.NewAzureRmExpressRouteConnectionCommand","New-AzExpressRouteConnection","1","8410","Parameter ExpressRouteGatewayBypass of cmdlet New-AzExpressRouteConnection does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name." +"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.Cortex.ExpressRouteGateway.UpdateAzureRmExpressRouteConnectionCommand","Set-AzExpressRouteConnection","1","8410","Parameter ExpressRouteGatewayBypass of cmdlet Set-AzExpressRouteConnection does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name." \ No newline at end of file