Get-AzRouteMap

Ruft eine Routenkarte eines VirtualHub ab.

Syntax

Get-AzRouteMap
   [-ResourceGroupName <String>]
   [-VirtualHubName <String>]
   [-Name <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRouteMap
   [-VirtualHubObject <PSVirtualHub>]
   [-Name <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRouteMap
   [-VirtualHubResourceId <String>]
   [-Name <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Beschreibung

Ruft die Routenkarte von einem VirtualHub ab.

Beispiele

Beispiel 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"

# creating new route map rules and a new route map resource and new routing configuration
$routeMapMatchCriterion1 = New-AzRouteMapRuleCriterion -MatchCondition "Contains" -RoutePrefix @("10.0.0.0/16")
$routeMapActionParameter1 = New-AzRouteMapRuleActionParameter -AsPath @("12345")
$routeMapAction1 = New-AzRouteMapRuleAction -Type "Add" -Parameter @($routeMapActionParameter1)
$routeMapRule1 = New-AzRouteMapRule -Name "rule1" -MatchCriteria @($routeMapMatchCriterion1) -RouteMapRuleAction @($routeMapAction1) -NextStepIfMatched "Continue"

$routeMapMatchCriterion2 = New-AzRouteMapRuleCriterion -MatchCondition "Equals" -AsPath @("12345")
$routeMapAction2 = New-AzRouteMapRuleAction -Type "Drop"
$routeMapRule2 = New-AzRouteMapRule -Name "rule2" -MatchCriteria @($routeMapMatchCriterion2) -RouteMapRuleAction @($routeMapAction2) -NextStepIfMatched "Terminate"

New-AzRouteMap -ResourceGroupName "testRg" -VirtualHubName "testHub" -Name "testRouteMap" -RouteMapRule @($routeMapRule1, $routeMapRule2)
Get-AzRouteMap -ResourceGroupName "testRg" -VirtualHubName "testHub" -Name "testRouteMap"

Name                          : testRouteMap
Id                            : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/routemap0419/providers/Microsoft.Network/virtualHubs/westcentralus_hub1/routeMaps/testRouteMap
ProvisioningState             : Succeeded
RouteMapRules                 : [
                                  {
                                    "Name": "rule1",
                                    "MatchCriteria": [
                                      {
                                        "MatchCondition": "Contains",
                                        "RoutePrefix": [
                                          "10.0.0.0/16"
                                        ],
                                        "Community": [],
                                        "AsPath": []
                                      }
                                    ],
                                    "Actions": [
                                      {
                                        "Type": "Add",
                                        "Parameters": [
                                          {
                                            "RoutePrefix": [],
                                            "Community": [],
                                            "AsPath": [
                                              "12345"
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "NextStepIfMatched": "Continue"
                                  },
                                  {
                                    "Name": "rule2",
                                    "MatchCriteria": [
                                      {
                                        "MatchCondition": "Equals",
                                        "RoutePrefix": [],
                                        "Community": [],
                                        "AsPath": [
                                          "12345"
                                        ]
                                      }
                                    ],
                                    "Actions": [
                                      {
                                        "Type": "Drop",
                                        "Parameters": []
                                      }
                                    ],
                                    "NextStepIfMatched": "Terminate"
                                  }
                                ]
AssociatedInboundConnections  : []
AssociatedOutboundConnections : []

Parameter

-DefaultProfile

Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure

Typ:IAzureContextContainer
Aliase:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-Name

Der Name der Routenkarte.

Typ:String
Aliase:ResourceName, RouteMapName
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:True

-ResourceGroupName

Der Name der Ressourcengruppe.

Typ:String
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-VirtualHubName

Der Name des virtuellen Hubs.

Typ:String
Aliase:ParentVirtualHubName, ParentResourceName
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-VirtualHubObject

Das Virtual Hub-Objekt.

Typ:PSVirtualHub
Aliase:ParentObject, ParentVirtualHub
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:True
Platzhalterzeichen akzeptieren:False

-VirtualHubResourceId

Die Virtual Hub-Ressourcen-ID.

Typ:String
Aliase:VirtualHubId, ParentVirtualHubId
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:True
Platzhalterzeichen akzeptieren:False

Eingaben

PSVirtualHub

String

Ausgaben

PSRouteMap