Get-AzRoutingIntent
Recupera un recurso de intención de enrutamiento asociado a un virtualHub.
Sintaxis
Get-AzRoutingIntent
-ResourceGroupName <String>
-HubName <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzRoutingIntent
-VirtualHub <PSVirtualHub>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzRoutingIntent
-ParentResourceId <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Obtiene la intención de enrutamiento especificada asociada al centro virtual especificado.
Ejemplos
Ejemplo 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"
$fwIp = New-AzFirewallHubPublicIpAddress -Count 1
$hubIpAddresses = New-AzFirewallHubIpAddress -PublicIP $fwIp
New-AzFirewall -Name "testFirewall" -ResourceGroupName "testRg" -Location "westcentralus" -Sku AZFW_Hub -VirtualHubId $virtualHub.Id -HubIPAddress $hubIpAddresses
$firewall = Get-AzFirewall -Name "testFirewall" -ResourceGroupName "testRg"
$policy1 = New-AzRoutingPolicy -Name "PrivateTraffic" -Destination @("PrivateTraffic") -NextHop $firewall.Id
$policy2 = New-AzRoutingPolicy -Name "PublicTraffic" -Destination @("Internet") -NextHop $firewall.Id
New-AzRoutingIntent -ResourceGroupName "testRg" -VirtualHubName "testHub" -Name "testRoutingIntent" -RoutingPolicy @($policy1, $policy2)
Get-AzRoutingIntent -ResourceGroupName "testRg" -VirtualHubName "testHub" -Name "testRoutingIntent"
ProvisioningState : Succeeded
RoutingPolicies : {PrivateTraffic, PublicTraffic}
RoutingPoliciesText : [
{
"Name": "PrivateTraffic",
"DestinationType": "TrafficType",
"Destinations": [
"PrivateTraffic"
],
"NextHopType": "ResourceId",
"NextHop": "/subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/azureFirewalls/testFirewall"
},
{
"Name": "PublicTraffic",
"DestinationType": "TrafficType",
"Destinations": [
"Internet"
],
"NextHopType": "ResourceId",
"NextHop": "/subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/azureFirewalls/testFirewall"
}
]
Name : testRoutingIntent
Etag : W/"etag"
Id : /subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/virtualHubs/testHub/routingIntent/testRoutingIntent
Este comando obtiene la intención de enrutamiento del centro virtual.
Ejemplo 2
$rgName = "testRg"
$virtualHubName = "testHub"
Get-AzRoutingIntent -Name $riName -VirtualHub $virtualHub
ProvisioningState : Succeeded
RoutingPolicies : {PrivateTraffic, PublicTraffic}
RoutingPoliciesText : [
{
"Name": "PrivateTraffic",
"DestinationType": "TrafficType",
"Destinations": [
"PrivateTraffic"
],
"NextHopType": "ResourceId",
"NextHop": "/subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/azureFirewalls/testFirewall"
},
{
"Name": "PublicTraffic",
"DestinationType": "TrafficType",
"Destinations": [
"Internet"
],
"NextHopType": "ResourceId",
"NextHop": "/subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/azureFirewalls/testFirewall"
}
]
Name : testRoutingIntent
Etag : W/"etag"
Id : /subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/virtualHubs/testHub/routingIntent/testRoutingIntent
Este comando obtiene la intención de enrutamiento en el centro virtual especificado.
Parámetros
-DefaultProfile
Credenciales, cuenta, inquilino y suscripción usados para la comunicación con Azure.
Tipo: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Posición: | Named |
Valor predeterminado: | None |
Requerido: | False |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | False |
-HubName
Nombre del recurso primario.
Tipo: | String |
Alias: | VirtualHubName, ParentVirtualHubName, ParentResourceName |
Posición: | Named |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | False |
-Name
Nombre del recurso.
Tipo: | String |
Alias: | ResourceName, RoutingIntentName |
Posición: | Named |
Valor predeterminado: | None |
Requerido: | False |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | True |
-ParentResourceId
Identificador del recurso primario.
Tipo: | String |
Alias: | VirtualHubId, ParentVirtualHubId |
Posición: | Named |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | True |
Aceptar caracteres comodín: | False |
-ResourceGroupName
El nombre del grupo de recursos.
Tipo: | String |
Posición: | Named |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | False |
-VirtualHub
Recurso primario.
Tipo: | PSVirtualHub |
Alias: | ParentObject, ParentVirtualHub |
Posición: | Named |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | True |
Aceptar caracteres comodín: | False |