Skip to content

Commit e58799f

Browse files
v-yuzhichenZiyue Zheng
andauthored
Fix Az.Peering Syntax Errors (#17738)
* Fix Az.Peering Syntax Errors * Fix Az.Peering Syntax Errors * Fix Az.Peering Syntax Errors Co-authored-by: Ziyue Zheng <[email protected]>
1 parent d7a6aa3 commit e58799f

9 files changed

+22
-44
lines changed

src/Peering/Peering/help/New-AzPeering.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Creates an ARM Peering for the subscription. See [New-AzPeeringDirectConnectionO
4343
### Create New Direct Peering
4444
```powershell
4545
#Gets the ASN
46-
$asn = Get-AzPeerAsn -PeerName Contoso
46+
$asn = Get-AzPeerAsn -Name Contoso
4747
#Gets the Direct Peering Location
4848
$location = Get-AzPeeringLocation Direct -PeeringLocation Seattle
4949
#Creates the ARM Resource
@@ -70,7 +70,7 @@ Create a new Direct Peering with a single connection at the Seattle facility usi
7070
### Create New Exchange Peering
7171
```powershell
7272
#Gets the ASN
73-
$asn = Get-AzPeerAsn -PeerName Contoso
73+
$asn = Get-AzPeerAsn -Name Contoso
7474
#Gets the Exchange Peering Location
7575
$location = Get-AzPeeringLocation Exchange -PeeringLocation Seattle
7676
#Creates the ARM Resource
@@ -96,7 +96,7 @@ Create a new exchange peering
9696
### Convert Legacy Peering to ARM Peering
9797
```powershell
9898
#Gets the ASN
99-
$asn = Get-AzPeerAsn -PeerName Contoso
99+
$asn = Get-AzPeerAsn -Name Contoso
100100
#Gets the legacy Peering
101101
$legacy = Get-AzLegacyPeering -PeeringLocation Amsterdam -Kind Direct | New-AzPeering -Name ContosoAmsterdamPeering -ResourceGroupName testCarrier -PeeringLocation $location.PeeringLocation -PeerAsnResourceId $asn.Id
102102
```

src/Peering/Peering/help/New-AzPeeringRegisteredPrefix.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ Create registered prefixes for peering objects.
3838
### Example 1: Get peering and create a registered prefix
3939
```powershell
4040
$peering = Get-AzPeering -ResourceGroupName $resourceGroupName -Name $name
41-
$peering | New-AzPeeringRegisteredPrefix -Name $asnName -Asn $asn
41+
$peering | New-AzPeeringRegisteredPrefix -Name $asnName -Prefix $prefix
4242
```
4343

4444
Get the peering you want to add a registered prefix. Then pass that to the commandlet.
4545

46-
### Example 2: Use peering resourceId to create a registered asn
46+
### Example 2: Use peering resourceId to create a registered prefix
4747
```powershell
48-
New-AzPeeringRegisteredPrefix -ResourceId $resourceId -Name $asnName -Asn $asn
48+
New-AzPeeringRegisteredPrefix -ResourceId $resourceId -Name $asnName -Prefix $prefix
4949
```
5050

5151
## PARAMETERS

src/Peering/Peering/help/New-AzPeeringService.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Creates peering service.
2525

2626
### Example 1
2727
```powershell
28-
New-AzPeeringService -ResourceGroupName $resourceGroup -Name $name -Location $loc -PeeringServiceProvider $provider
28+
New-AzPeeringService -ResourceGroupName $resourceGroup -Name $name -PeeringServiceProvider $provider
2929
```
3030

3131
```output

src/Peering/Peering/help/Remove-AzPeerAsn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Remove a PeerAsn from the subscription.
3737

3838
### Example 1
3939
```powershell
40-
Remove-AzPeerAsn -PeerName Contoso -Force
40+
Remove-AzPeerAsn -Name Contoso -Force
4141
```
4242

4343
Removes the Peer Asn

src/Peering/Peering/help/Remove-AzPeeringServicePrefix.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,25 @@ Removes a peering service prefix from a peering service.
3737

3838
### Example 1
3939
```powershell
40-
Get-AzPeeringService -ResourceGroupName $rgName -Name $peeringServiceName | Remove-AzPeeringServicePrefix -Name $prefixName
40+
Get-AzPeeringServicePrefix -ResourceGroupName $rgName -PeeringServiceName $peeringServiceName -Name $prefixName | Remove-AzPeeringServicePrefix
4141
```
4242

43-
Remove a prefix from a peering service object
43+
Remove a prefix from a peering service prefix object
4444

4545
### Example 2
4646
```powershell
47-
Remove-AzPeeringServicePrefix -ResourceId $peeringServiceResourceId -Name $prefixName -PassThru
47+
Remove-AzPeeringServicePrefix -ResourceId $peeringServicePrefixResourceId -PassThru
4848
```
4949

5050
```output
5151
True
5252
```
5353

54-
Remove a prefix from a peering service resource id.
54+
Remove a prefix from a peering service prefix resource id.
5555

5656
### Example 3
5757
```powershell
58-
Remove-AzPeeringServicePrefix -ResourceGroupName $peeringServiceGroup -PeeringServiceName $peeringServiceName -Name $prefixName -PassThru
58+
Remove-AzPeeringServicePrefix -ResourceGroupName $peeringServiceGroup -Name $peeringServiceName -PrefixName $prefixName -PassThru
5959
```
6060

6161
```output

src/Peering/Peering/help/Set-AzPeerAsn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Allows you to update contact information for a PeerAsn on the subscription.
2525
### Example 1
2626
```powershell
2727
#Get the Peer ASN object
28-
Get-AzPeerAsn -PeerName Contoso | Set-AzPeerAsn -Email [email protected]
28+
Get-AzPeerAsn -Name Contoso | Set-AzPeerAsn
2929
```
3030

3131
```output

src/Peering/Peering/help/Set-AzPeeringDirectConnectionObject.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ Used in conjunction with Update-AzPeering, this is an in memory operation and wi
4949

5050
### Example 1: Upgrade Bandwidth
5151
```powershell
52-
$update = Get-AzPeering -PeerName "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringDirectConnectionObject -BandwidthInMbps 30000
52+
$update = Get-AzPeering -Name "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringDirectConnectionObject -BandwidthInMbps 30000
5353
```
5454

5555
Upgrades the bandwidth for the first connection in the Peering object in memory.
5656

5757
### Example 2: Update Bgp Session Address
5858
```powershell
59-
$update = Get-AzPeering -PeerName "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringDirectConnectionObject -SessionPrefixV4 "192.168.0.1" -MaxPrefixesAdvertisedIPv4 20000
59+
$update = Get-AzPeering -Name "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringDirectConnectionObject -SessionPrefixV4 "192.168.0.1" -MaxPrefixesAdvertisedIPv4 20000
6060
```
6161

6262
Updates the Peering Address for the first connection in the Peering object in memory.
6363

6464
### Example 3: Update Use for peering service
6565
```powershell
66-
$update = Get-AzPeering -PeerName "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringDirectConnectionObject -UseForPeeringService $true
66+
$update = Get-AzPeering -Name "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringDirectConnectionObject -UseForPeeringService $true
6767
```
6868

6969
```output

src/Peering/Peering/help/Set-AzPeeringExchangeConnectionObject.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ Used in conjunction with Update-AzPeering, this is an in memory operation and wi
3737

3838
### Example 1: Update Md5 Hash
3939
```powershell
40-
$update = Get-AzPeering -PeerName "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringExchangeConnectionObject -MD5AuthenticationKey $hash
40+
$update = Get-AzPeering -Name "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringExchangeConnectionObject -MD5AuthenticationKey $hash
4141
```
4242

4343
Updates the Md5 Hash for the first connection in the Peering object in memory.
4444

4545
### Example 2: Update Bgp Session Address
4646
```powershell
47-
$update = Get-AzPeering -PeerName "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringExchangeConnectionObject -PeerSessionIPv4Address "192.168.0.1" -MaxPrefixesAdvertisedIPv4 20000
47+
$update = Get-AzPeering -Name "ContosoPeering" -ResourceGroupName rg1 | Set-AzPeeringExchangeConnectionObject -PeerSessionIPv4Address "192.168.0.1" -MaxPrefixesAdvertisedIPv4 20000
4848
```
4949

5050
Updates the Peering Address for the first connection in the Peering object in memory.

src/Peering/Peering/help/Update-AzPeering.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,38 +55,16 @@ Sets the PSPeering Object
5555

5656
### Example 1: Update Md5 Authentication Key
5757
```powershell
58-
$peering = Get-AzPeering -ResourceGroupName rg1 -PeerName "ContosoPeering"
58+
$peering = Get-AzPeering -ResourceGroupName rg1 -Name "ContosoPeering"
5959
$peering.Connections[0] = $peering.Connections[0] | Set-AzPeeringDirectConnectionObject -MD5AuthenticationKey $hash
6060
$peering | Update-AzPeering
6161
```
6262

6363
Sets the Md5 Authentication Key
6464

65-
### Example 2: Update UseForPeeringService
65+
### Example 2: Update IPv4 Address for Exchange Peering
6666
```powershell
67-
Update-AzPeering -ResourceGroupName rg1 -Name ContosoPeering -UseForPeeringService $true
68-
```
69-
70-
```output
71-
Name : ContosoPeering
72-
Sku.Name : Premium_Direct_Free
73-
Kind : Direct
74-
Connections : {71}
75-
PeerAsn.Id : /subscriptions//providers/Microsoft.Peering/peerAsns/Contoso
76-
UseForPeeringService : True
77-
PeeringLocation : Seattle
78-
ProvisioningState : Succeeded
79-
Location : West US 2
80-
Id : /subscriptions//resourceGroups/rg1/providers/Microsoft.Peering/peerings/ContosoPeering
81-
Type : Microsoft.Peering/peerings
82-
Tags : {[tag2, value2], [tag1, value1]}
83-
```
84-
85-
Sets the Use for Peering Service Flag
86-
87-
### Example 3: Update IPv4 Address for Exchange Peering
88-
```powershell
89-
$peering = Get-AzPeering -ResourceGroupName rg1 -PeerName "ContosoExchangePeering"
67+
$peering = Get-AzPeering -ResourceGroupName rg1 -Name "ContosoExchangePeering"
9068
$peering.Connections[0] = $peering.Connections[0] | Set-AzPeeringExchangeConnectionObject -PeerSessionIPv4Address $ipv4Address
9169
Update-AzPeering -ResourceId $peering.Id $peering.Connections
9270
```

0 commit comments

Comments
 (0)