Edit

Share via


Get-AzNetworkManagerRoutingRule

Gets a routing rule in a network manager.

Syntax

ByList (Default)

Get-AzNetworkManagerRoutingRule
    -RuleCollectionName <String>
    -RoutingConfigurationName <String>
    -NetworkManagerName <String>
    -ResourceGroupName <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByName

Get-AzNetworkManagerRoutingRule
    -Name <String>
    -RuleCollectionName <String>
    -RoutingConfigurationName <String>
    -NetworkManagerName <String>
    -ResourceGroupName <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByResourceId

Get-AzNetworkManagerRoutingRule
    -ResourceId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzNetworkManagerRoutingRule cmdlets gets a routing rule in a network manager.

Examples

Example 1

Get-AzNetworkManagerRoutingRule  -Name "testRule" -RuleCollectionName "TestRC" -RoutingConfigurationName "TestRoutingConfig" -NetworkManagerName "TestNMName" -ResourceGroupName "TestRG"
Name                  : testRule
Description           : Description
Type                  : Microsoft.Network/networkManagers/routingConfigurations/ruleCollections/rules
Id                    : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/routingConfigurations/TestRoutingConfig/ruleCollections/TestRC/rules/testRule
Etag                  : "00000000-0000-0000-0000-000000000000"
ProvisioningState     : Succeeded
NextHop               : {
                            "NextHopAddress": "ApiManagement",
                            "NextHopType": "ServiceTag"
                        }
Destination           : {
                            "DestinationAddress": "10.0.0.1",
                            "Type": "AddressPrefix"
                        }
SystemData            : {
                          "CreatedBy": "00000000-0000-0000-0000-000000000000",
                          "CreatedByType": "Application",
                          "CreatedAt": "2021-10-18T04:06:05",
                          "LastModifiedBy": "00000000-0000-0000-0000-000000000000",
                          "LastModifiedByType": "Application",
                          "LastModifiedAt": "2021-10-18T04:06:06"
                        }

Gets a routing rule in a rule collection.

Example 2

Get-AzNetworkManagerRoutingRule  -RuleCollectionName "TestRC" -RoutingConfigurationName "TestRoutingConfig" -NetworkManagerName "TestNMName" -ResourceGroupName "TestRG"
Name                  : testRule
Description           : Description
Type                  : Microsoft.Network/networkManagers/routingConfigurations/ruleCollections/rules
Id                    : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/routingConfigurations/TestRoutingConfig/ruleCollections/TestRC/rules/testRule
Etag                  : "00000000-0000-0000-0000-000000000000"
ProvisioningState     : Succeeded
NextHop               : {
                            "NextHopAddress": "ApiManagement",
                            "NextHopType": "ServiceTag"
                        }
Destination           : {
                            "DestinationAddress": "10.0.0.1",
                            "Type": "AddressPrefix"
                        }
SystemData            : {
                          "CreatedBy": "00000000-0000-0000-0000-000000000000",
                          "CreatedByType": "Application",
                          "CreatedAt": "2021-10-18T04:06:05",
                          "LastModifiedBy": "00000000-0000-0000-0000-000000000000",
                          "LastModifiedByType": "Application",
                          "LastModifiedAt": "2021-10-18T04:06:06"
                        }

Name                  : testRule2
Description           : Description
Type                  : Microsoft.Network/networkManagers/routingConfigurations/ruleCollections/rules
Id                    : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/routingConfigurations/TestRoutingConfig/ruleCollections/TestRC/rules/testRule2
Etag                  : "00000000-0000-0000-0000-000000000000"
ProvisioningState     : Succeeded
NextHop               : {
                            "NextHopAddress": "ApiManagement",
                            "NextHopType": "ServiceTag"
                        }
Destination           : {
                            "DestinationAddress": "20.0.0.1",
                            "Type": "AddressPrefix"
                        }
SystemData            : {
                          "CreatedBy": "00000000-0000-0000-0000-000000000000",
                          "CreatedByType": "Application",
                          "CreatedAt": "2021-10-18T04:06:05",
                          "LastModifiedBy": "00000000-0000-0000-0000-000000000000",
                          "LastModifiedByType": "Application",
                          "LastModifiedAt": "2021-10-18T04:06:06"
                        }

Gets all rules within a routing rule collection.

Parameters

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The resource name.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:ResourceName

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-NetworkManagerName

The network manager name.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

ByList
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

The resource group name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByList
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceId

NetworkManager RoutingRule Id

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:RoutingRuleId

Parameter sets

ByResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RoutingConfigurationName

The network manager routing configuration name.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:ConfigName

Parameter sets

ByList
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RuleCollectionName

The network manager routing rule collection name.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

ByList
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

PSNetworkManagerRoutingRule