Skip to content
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.Peering Syntax Errors #17738

Merged
merged 3 commits into from
May 7, 2022
Merged

Conversation

v-yuzhichen
Copy link
Contributor

Description

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@@ -38,14 +38,14 @@ Create registered prefixes for peering objects.
### Example 1: Get peering and create a registered prefix
```powershell
$peering = Get-AzPeering -ResourceGroupName $resourceGroupName -Name $name
$peering | New-AzPeeringRegisteredPrefix -Name $asnName -Asn $asn
$peering | New-AzPeeringRegisteredPrefix -Name $asnName
```

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

### Example 2: Use peering resourceId to create a registered asn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example 2: Use peering resourceId to create a registered prefix

@@ -38,14 +38,14 @@ Create registered prefixes for peering objects.
### Example 1: Get peering and create a registered prefix
```powershell
$peering = Get-AzPeering -ResourceGroupName $resourceGroupName -Name $name
$peering | New-AzPeeringRegisteredPrefix -Name $asnName -Asn $asn
$peering | New-AzPeeringRegisteredPrefix -Name $asnName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$peering | New-AzPeeringRegisteredPrefix -Name $asnName -Prefix $prefix

```

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

### Example 2: Use peering resourceId to create a registered asn
```powershell
New-AzPeeringRegisteredPrefix -ResourceId $resourceId -Name $asnName -Asn $asn
New-AzPeeringRegisteredPrefix -ResourceId $resourceId -Name $asnNames
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New-AzPeeringRegisteredPrefix -ResourceId $resourceId -Name $asnName -Prefix $prefix

@@ -55,7 +55,7 @@ Remove a prefix from a peering service resource id.

### Example 3
```powershell
Remove-AzPeeringServicePrefix -ResourceGroupName $peeringServiceGroup -PeeringServiceName $peeringServiceName -Name $prefixName -PassThru
Remove-AzPeeringServicePrefix -ResourceGroupName $peeringServiceGroup -Name $prefixName -PassThru
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

40: Get-AzPeeringServicePrefix -ResourceGroupName $rgName -PeeringServiceName $peeringServiceName -Name $prefixName | Remove-AzPeeringServicePrefix

47: Remove-AzPeeringServicePrefix -ResourceId $peeringServicePrefixResourceId -PassThru

58: Remove-AzPeeringServicePrefix -ResourceGroupName $peeringServiceGroup -Name $peeringServiceName -PrefixName $prefixName -PassThru

@@ -64,7 +64,7 @@ Sets the Md5 Authentication Key

### Example 2: Update UseForPeeringService
```powershell
Update-AzPeering -ResourceGroupName rg1 -Name ContosoPeering -UseForPeeringService $true
Update-AzPeering -ResourceGroupName rg1 -Name ContosoPeering
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the entire example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete the entire example?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without "UseForPeeringService" parameter, this example is meaningless. It updates nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants