Skip to content

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


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

```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

### 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

### 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

### 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