Dela via


Update-AzVirtualHubBgpConnection

Cmdleten Update-AzVirtualHubBgpConnection uppdaterar en befintlig HubBgpConnection-resurs (Virtual WAN Hub BGP-anslutning).

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

Cmdleten Update-AzVirtualHubBgpConnection uppdaterar en befintlig HubBgpConnection-resurs (Virtual WAN Hub BGP-anslutning).

Exempel

Exempel 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

Ovanstående skapar en resursgrupp, Virtual WAN, Virtual Network, Virtual WAN Hub i USA, västra och ansluter det virtuella nätverket till Virtual WAN Hub i resursgruppen i Azure. Därefter skapas en BGP-anslutning för virtual WAN-hubben som peerkopplar Virtual WAN Hub med nätverksinstallationen som distribueras i det virtuella nätverket. Den här BGP-anslutningen för Virtual WAN Hub uppdateras sedan så att den har en annan peer-IP-adress.

Parametrar

-AsJob

Kör cmdlet i bakgrunden

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:IAzureContextContainer
Alias:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InputObject

Den virtuella hubbens bgp-anslutningsresurs.

Typ:PSBgpConnection
Alias:VirtualHubBgpConnection
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-Name

Resursnamnet.

Typ:String
Alias:ResourceName, BgpConnectionName
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-PeerAsn

Peer-ASN.

Typ:UInt32
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-PeerIp

Peer-IP-adressen.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceGroupName

Resursgruppens namn.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceId

Resurs-ID:t.

Typ:String
Alias:BgpConnectionId
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-VirtualHub

Den virtuella hubbresursen.

Typ:PSVirtualHub
Alias:ParentObject, ParentVirtualHub
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-VirtualHubName

Namnet på den virtuella hubben.

Typ:String
Alias:ParentResourceName, ParentVirtualHubName
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-VirtualHubVnetConnection

VirtualHubVnetConnection-resursen.

Typ:PSHubVirtualNetworkConnection
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-VirtualHubVnetConnectionId

Resurs-ID:t VirtualHubVnetConnection.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-WhatIf

Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

PSVirtualHub

PSBgpConnection

PSHubVirtualNetworkConnection

String

Utdata

PSBgpConnection