Editar

Compartilhar via


Update-AzVirtualHubBgpConnection

The Update-AzVirtualHubBgpConnection cmdlet updates an existing HubBgpConnection resource (Virtual WAN Hub BGP Connection).

Syntax

Update-AzVirtualHubBgpConnection
      -ResourceGroupName <String>
      -VirtualHubName <String>
      -Name <String>
      -PeerIp <String>
      -PeerAsn <UInt32>
      -VirtualHubVnetConnection <PSHubVirtualNetworkConnection>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      -ResourceGroupName <String>
      -VirtualHubName <String>
      -Name <String>
      -PeerIp <String>
      -PeerAsn <UInt32>
      -VirtualHubVnetConnectionId <String>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      -Name <String>
      -PeerIp <String>
      -PeerAsn <UInt32>
      -VirtualHubVnetConnection <PSHubVirtualNetworkConnection>
      -VirtualHub <PSVirtualHub>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      -Name <String>
      -PeerIp <String>
      -PeerAsn <UInt32>
      -VirtualHubVnetConnectionId <String>
      -VirtualHub <PSVirtualHub>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      -PeerIp <String>
      -PeerAsn <UInt32>
      -VirtualHubVnetConnection <PSHubVirtualNetworkConnection>
      -ResourceId <String>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      -PeerIp <String>
      -PeerAsn <UInt32>
      -VirtualHubVnetConnectionId <String>
      -ResourceId <String>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      [-PeerIp <String>]
      [-PeerAsn <UInt32>]
      -VirtualHubVnetConnection <PSHubVirtualNetworkConnection>
      -InputObject <PSBgpConnection>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      [-PeerIp <String>]
      [-PeerAsn <UInt32>]
      -VirtualHubVnetConnectionId <String>
      -InputObject <PSBgpConnection>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualHubBgpConnection
      [-PeerIp <String>]
      [-PeerAsn <UInt32>]
      [-VirtualHubVnetConnection <PSHubVirtualNetworkConnection>]
      [-VirtualHubVnetConnectionId <String>]
      -InputObject <PSBgpConnection>
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Update-AzVirtualHubBgpConnection cmdlet updates an existing HubBgpConnection resource (Virtual WAN Hub BGP Connection).

Examples

Example 1

New-AzResourceGroup -Location "West US" -Name "testRG"
$frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "192.168.1.0/24"
$backendSubnet  = New-AzVirtualNetworkSubnetConfig -Name backendSubnet  -AddressPrefix "192.168.2.0/24"
$remoteVirtualNetwork = New-AzVirtualNetwork -Name "testVirtualNetwork" -ResourceGroupName "testRG" -Location "West US" -AddressPrefix "192.168.0.0/16" -Subnet $frontendSubnet,$backendSubnet
$virtualWan = New-AzVirtualWan -ResourceGroupName "testRG" -Name "testWan" -Location "West US"
New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "testHub" -AddressPrefix "10.0.1.0/24"
$hubVnetConnection = New-AzVirtualHubVnetConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -Name "testVnetConnection" -RemoteVirtualNetwork $remoteVirtualNetwork
New-AzVirtualHubBgpConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -PeerIp 192.168.1.5 -PeerAsn 20000 -Name "testBgpConnection" -VirtualHubVnetConnection $hubVnetConnection
Update-AzVirtualHubBgpConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -PeerIp 192.168.1.6 -PeerAsn 20000 -Name "testBgpConnection" -VirtualHubVnetConnection $hubVnetConnection

Name                        : testBgpConnection
Id                          : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/testHub/bgpConnections/testBgpConnection
HubVirtualNetworkConnection : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/testHub/hubVirtualNetworkConnections/testVnetConnection
PeerAsn                     : 20000
PeerIp                      : 192.168.1.6

The above will create a resource group, Virtual WAN, Virtual Network, Virtual WAN Hub in West US and connect the Virtual Network to the Virtual WAN Hub in that resource group in Azure. A Virtual WAN Hub BGP Connection will be created thereafter which will peer the Virtual WAN Hub with the network appliance deployed in the Virtual Network. This Virtual WAN Hub BGP Connection is then updated to have a different Peer IP.

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The virtual hub bgp connection resource.

Type:PSBgpConnection
Aliases:VirtualHubBgpConnection
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The resource name.

Type:String
Aliases:ResourceName, BgpConnectionName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PeerAsn

The peer ASN.

Type:UInt32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PeerIp

The peer IP.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The resource id.

Type:String
Aliases:BgpConnectionId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualHub

The virtual hub resource.

Type:PSVirtualHub
Aliases:ParentObject, ParentVirtualHub
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VirtualHubName

The virtual hub name.

Type:String
Aliases:ParentResourceName, ParentVirtualHubName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualHubVnetConnection

The VirtualHubVnetConnection resource.

Type:PSHubVirtualNetworkConnection
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualHubVnetConnectionId

The VirtualHubVnetConnection resource id.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSVirtualHub

PSBgpConnection

PSHubVirtualNetworkConnection

String

Outputs

PSBgpConnection