Bewerken

Delen via


Get-AzVHubInboundRoute

Retrieves the inbound routes of a virtual hub connection

Syntax

Get-AzVHubInboundRoute
   -ResourceGroupName <String>
   -VirtualHubName <String>
   [-ResourceUri <String>]
   [-VirtualWanConnectionType <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzVHubInboundRoute
   -VirtualHubObject <PSVirtualHub>
   [-ResourceUri <String>]
   [-VirtualWanConnectionType <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzVHubInboundRoute
   -VirtualHubResourceId <String>
   [-ResourceUri <String>]
   [-VirtualWanConnectionType <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Gets the inbound routes of the given virtual hub connection

Examples

Example 1

New-AzVirtualWan -ResourceGroupName "testRg" -Name "testWan" -Location "westcentralus" -VirtualWANType "Standard" -AllowVnetToVnetTraffic -AllowBranchToBranchTraffic
$virtualWan = Get-AzVirtualWan -ResourceGroupName "testRg" -Name "testWan"
New-AzVirtualHub -ResourceGroupName "testRg" -Name "testHub" -Location "westcentralus" -AddressPrefix "10.0.0.0/16" -VirtualWan $virtualWan
$virtualHub = Get-AzVirtualHub -ResourceGroupName "testRg" -Name "testHub"
$hubVnetConnectionId = "/subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/virtualHubs/testHub/hubVirtualNetworkConnections/testCon"
Get-AzVHubInboundRoute -VirtualHubObject $virtualHub -ResourceUri $hubVnetConnectionId -VirtualWanConnectionType "HubVirtualNetworkConnection"

Value : [
          {
            "Prefix": "10.2.0.0/16",
            "BgpCommunities": "4293853166",
            "AsPath": ""
          }
        ]

This command gets the inbound routes of the virtual hub spoke vnet connection.

Parameters

-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

-ResourceGroupName

The resource group name.

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

-ResourceUri

The resource uri of a virtual wan connection resource.

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

-VirtualHubName

The virtual hub resource name.

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

-VirtualHubObject

The parent resource.

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

-VirtualHubResourceId

The virtual hub resource id.

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

-VirtualWanConnectionType

The virtual wan connection type.

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

Inputs

PSVirtualHub

String

Outputs

PSVirtualHubEffectiveRouteMapRouteList