-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Az.Network Syntax Errors #17701
Fix Az.Network Syntax Errors #17701
Conversation
@@ -47,8 +47,8 @@ $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Na | |||
Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300 | |||
$ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit | |||
$ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id | |||
New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 | |||
Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" | |||
New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceId $ExpressRouteGateway.Id -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-ExpressRouteGatewayName
New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 | ||
Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" | ||
New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceId $ExpressRouteGateway.Id -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 | ||
Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceId $ExpressRouteGateway.Id -Name "testConnection" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-ExpressRouteGatewayName
@@ -37,7 +37,7 @@ connectivity. | |||
|
|||
### Example 1: Display the route table for the primary path | |||
```powershell | |||
Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CircuitName -DevicePath 'Primary' | |||
Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName $RG -CrossConnectionName $CircuitName -DevicePath 'Primary' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-PeeringType MicrosoftPeering
@@ -37,7 +37,7 @@ router. | |||
|
|||
### Example 1: Display the route summary for the primary path | |||
```powershell | |||
Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CrossConnectionName -DevicePath 'Primary' | |||
Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName $RG -CrossConnectionName $CrossConnectionName -DevicePath 'Primary' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-PeeringType MicrosoftPeering
@@ -34,7 +34,7 @@ The second command creates an application gateway with the autoscale configurati | |||
### Example 2 | |||
|
|||
```powershell | |||
$gw = Get-AzApplicationGateway -Name <Name> -ResourceGroupName <ResourceGroupName> | |||
$gw = Get-AzApplicationGateway -Name $name -ResourceGroupName $rgname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
@@ -133,8 +133,8 @@ This example creates a Firewall with all available availability zones. | |||
```powershell | |||
$rgName = "resourceGroupName" | |||
$vnet = Get-AzVirtualNetwork -Name "vnet" -ResourceGroupName $rgName | |||
$pip1 = New-AzPublicIpAddress -Name "AzFwPublicIp1" -ResourceGroupName "rg" -SkuName "AZFW_VNet" -SkuTier "Standard" -Location "centralus" -AllocationMethod Static | |||
$pip2 = New-AzPublicIpAddress -Name "AzFwPublicIp2" -ResourceGroupName "rg" -SkuName "AZFW_VNet" -SkuTier "Standard" -Location "centralus" -AllocationMethod Static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Sku "Basic" -Tier "Regional"
@@ -51,7 +51,7 @@ Removes the ExpressRoutePort resource in InputObject. | |||
|
|||
### Example 3 | |||
```powershell | |||
Remove-AzExpressRoutePort -Name $ResourceId $id | |||
Remove-AzExpressRoutePort -Name $ResourceId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
47: -InputObject $Port
54: Remove-AzExpressRoutePort -ResourceId $id
@@ -24,7 +24,7 @@ The **Set-AzNetworkInterfaceTapConfig** updates a tap configuration for a networ | |||
|
|||
### Example 1: Set the TapConfiguration with updated TapConfig name | |||
```powershell | |||
$tapConfig = Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName" -Name "tapconfigName" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get-AzNetworkInterfaceTapConfig -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName" -Name "tapconfigName"
@@ -28,7 +28,7 @@ $networkProfile = Get-AzNetworkProfile -Name np1 -ResourceGroupName rg1 | |||
|
|||
$networkProfile.Tags = "TestTag" | |||
|
|||
$networkProfile.ContainerNetworkInterfaceConfigurations = New-AzNetworkProfileContainerNicConfig -Name cnicconfig1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New-AzContainerNicConfig
$vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" | ||
New-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule" -Type Static -Mode EgressSnat -InternalMapping "10.0.0.1/26" -ExternalMapping "192.168.0.0/26" | ||
$natRule = Update-AzVpnGatewayNatRule -InputObject $vpnConnection -IpSecPolicy $ipsecPolicy | ||
$natRule = Update-AzVpnGatewayNatRule -InputObject $vpnConnection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$natRule = Get-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule"
@@ -88,7 +88,7 @@ Then it gets the connection using the connection name. | |||
### Example 2 | |||
|
|||
```powershell | |||
Get-AzExpressRouteConnection -ResourceGroupName ps9361 -ParentResourceName testExpressRoutegw -Name test* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-ExpressRouteGatewayName
82aed38
to
371c593
Compare
@@ -24,7 +24,8 @@ The **Set-AzServiceEndpointPolicy** cmdlet create a service endpoint policy. | |||
|
|||
### Example 1: Sets a service endpoint policy | |||
```powershell | |||
$serviceEndpointPolicy = Set-AzServiceEndpointPolicy -Name "Policy1" -ServiceEndpointPolicy $serviceEndpointPolicy -ResourceGroup "resourcegroup1" | |||
$serviceEndpointPolicy = New-AzServiceEndpointPolicy -Name "Policy1" -ResourceGroupName "resourcegroup1" -Location "eastus" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
21: create → updates
27: $serviceEndpointPolicy = Get-AzServiceEndpointPolicy -Name "Policy1" -ResourceGroupName "resourcegroup1"
1bab00f
to
f9e6603
Compare
f9e6603
to
3456872
Compare
Description
Fix Az.Network Syntax Errors
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added