Partager via


Route Maps - List

Retrieves the details of all RouteMaps.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps?api-version=2024-01-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The resource group name of the RouteMap's resource group'.

subscriptionId
path True

string

The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

virtualHubName
path True

string

The name of the VirtualHub containing the RouteMap.

api-version
query True

string

Client API version.

Responses

Name Type Description
200 OK

ListRouteMapsResult

Request successful. Returns the details of all the RouteMaps for the VirtualHub.

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

RouteMapList

Sample request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps?api-version=2024-01-01

Sample response

{
  "value": [
    {
      "name": "routeMap1",
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1",
      "etag": "W/\\00000000-0000-0000-0000-000000000000\\",
      "properties": {
        "provisioningState": "Succeeded",
        "rules": [
          {
            "name": "rule1",
            "matchCriteria": [
              {
                "matchCondition": "Contains",
                "routePrefix": [
                  "10.0.0.0/8"
                ],
                "community": [],
                "asPath": []
              }
            ],
            "actions": [
              {
                "type": "Add",
                "parameters": [
                  {
                    "routePrefix": [],
                    "community": [],
                    "asPath": [
                      "22334"
                    ]
                  }
                ]
              }
            ],
            "nextStepIfMatched": "Continue"
          }
        ],
        "associatedInboundConnections": [
          "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1"
        ],
        "associatedOutboundConnections": []
      },
      "type": "Microsoft.Network/virtualHubs/routeMaps"
    }
  ]
}

Definitions

Name Description
Action

Action to be taken on a route matching a RouteMap criterion.

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

Criterion

A matching criteria which matches routes based on route prefix, community, and AS path.

ListRouteMapsResult

List of RouteMaps and a URL nextLink to get the next set of results.

NextStep

Supported next step behaviors after a rule is applied to a matched route

Parameter

Parameters for an Action.

ProvisioningState

The current provisioning state.

RouteMap

The RouteMap child resource of a Virtual hub.

RouteMapActionType

Kind of actions which can be taken on a matched route. Add, Replace, Remove refer to parameters on the route, like community or prefix

RouteMapMatchCondition

Match condition to apply RouteMap rules.

RouteMapRule

A RouteMap Rule.

Action

Action to be taken on a route matching a RouteMap criterion.

Name Type Description
parameters

Parameter[]

List of parameters relevant to the action.For instance if type is drop then parameters has list of prefixes to be dropped.If type is add, parameters would have list of ASN numbers to be added

type

RouteMapActionType

Type of action to be taken. Supported types are 'Remove', 'Add', 'Replace', and 'Drop.'

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

Cloud error body.

CloudErrorBody

An error response from the service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

Criterion

A matching criteria which matches routes based on route prefix, community, and AS path.

Name Type Description
asPath

string[]

List of AS paths which this criteria matches.

community

string[]

List of BGP communities which this criteria matches.

matchCondition

RouteMapMatchCondition

Match condition to apply RouteMap rules.

routePrefix

string[]

List of route prefixes which this criteria matches.

ListRouteMapsResult

List of RouteMaps and a URL nextLink to get the next set of results.

Name Type Description
nextLink

string

URL to get the next set of operation list results if there are any.

value

RouteMap[]

List of RouteMaps.

NextStep

Supported next step behaviors after a rule is applied to a matched route

Name Type Description
Continue

string

Terminate

string

Unknown

string

Parameter

Parameters for an Action.

Name Type Description
asPath

string[]

List of AS paths.

community

string[]

List of BGP communities.

routePrefix

string[]

List of route prefixes.

ProvisioningState

The current provisioning state.

Name Type Description
Deleting

string

Failed

string

Succeeded

string

Updating

string

RouteMap

The RouteMap child resource of a Virtual hub.

Name Type Description
etag

string

A unique read-only string that changes whenever the resource is updated.

id

string

Resource id.

name

string

The name of the resource that is unique within a resource group. This name can be used to access the resource.

properties.associatedInboundConnections

string[]

List of connections which have this RoutMap associated for inbound traffic.

properties.associatedOutboundConnections

string[]

List of connections which have this RoutMap associated for outbound traffic.

properties.provisioningState

ProvisioningState

The provisioning state of the RouteMap resource.

properties.rules

RouteMapRule[]

List of RouteMap rules to be applied.

type

string

Resource type.

RouteMapActionType

Kind of actions which can be taken on a matched route. Add, Replace, Remove refer to parameters on the route, like community or prefix

Name Type Description
Add

string

Drop

string

Remove

string

Replace

string

Unknown

string

RouteMapMatchCondition

Match condition to apply RouteMap rules.

Name Type Description
Contains

string

Equals

string

NotContains

string

NotEquals

string

Unknown

string

RouteMapRule

A RouteMap Rule.

Name Type Description
actions

Action[]

List of actions which will be applied on a match.

matchCriteria

Criterion[]

List of matching criterion which will be applied to traffic.

name

string

The unique name for the rule.

nextStepIfMatched

NextStep

Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'.