Management Plane API > Networking > Logical Routing And Services > Routing Configuration

Add RouteMap on a Logical Router

Adds a new RouteMap on a Logical Router

Request:

Method:
POST
URI Path(s):
/api/v1/logical-routers/<logical-router-id>/routing/route-maps
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
RouteMap+

Example Request:

POST https://<nsx-mgr>/api/v1/logical-routers/7a62a0c5-1ea1-4b25-9d43-dce1c0fa4b8c/routing/route-maps { "resource_type": "RouteMap", "description": "Route Map for West Customers", "display_name": "route map West", "sequences": [ { "match_criteria": { "ip_prefix_lists": [ "5f22f70e-5725-4df3-9e25-46358642848f", "5c45c18f-0221-4a86-a7c0-1460812564f4", "dfd1bc6e-570b-4531-a032-d5ed1c8b6261" ] }, "set_criteria": { "as_path_prepend" : "50", "weight" : 10, "multi_exit_discriminator" : 50, "add_community" : "30:40" }, "action": "PERMIT" }, { "match_criteria": { "ip_prefix_lists": [ "dfd1bc6e-570b-4531-a032-d5ed1c8b6262" ] }, "set_criteria": { "as_path_prepend" : "60", "weight" : 20, "multi_exit_discriminator" : 30, "add_community" : "NO_EXPORT" }, "action": "PERMIT" }, { "match_criteria": { "match_community_expression": { "expression": [ { "match_operator": "MATCH_REGEX", "regular_expression": "123:11.*" }, { "match_operator": "MATCH_ANY", "community_list_id": "c4b2b171-661b-4059-960c-fc931a612507" } ], "operator": "AND" } }, "set_criteria": { "as_path_prepend" : "60", "weight" : 20, "multi_exit_discriminator" : 30, "add_community" : "NO_EXPORT" }, "action": "PERMIT" } ] }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RouteMap+

Example Response:

{ "resource_type": "RouteMap", "description": "Route Map for West Customers", "id": "3e744129-4712-4de3-9659-df69b4a312cb", "display_name": "route map West", "sequences": [ { "match_criteria": { "ip_prefix_lists": [ "5f22f70e-5725-4df3-9e25-46358642848f", "5c45c18f-0221-4a86-a7c0-1460812564f4", "dfd1bc6e-570b-4531-a032-d5ed1c8b6261" ] }, "set_criteria": { "as_path_prepend" : "50", "weight" : 10, "multi_exit_discriminator" : 50, "add_community" : "30:40" }, "action": "PERMIT" }, { "match_criteria": { "ip_prefix_lists": [ "dfd1bc6e-570b-4531-a032-d5ed1c8b6262" ] }, "set_criteria": { "as_path_prepend" : "60", "weight" : 20, "multi_exit_discriminator" : 30, "add_community" : "NO_EXPORT" }, "action": "PERMIT" } { "match_criteria": { "match_community_expression": { "expression": [ { "match_operator": "MATCH_REGEX", "regular_expression": "123:11.*" }, { "match_operator": "MATCH_ANY", "community_list_id": "c4b2b171-661b-4059-960c-fc931a612507" } ], "operator": "AND" } }, "set_criteria": { "as_path_prepend" : "60", "weight" : 20, "multi_exit_discriminator" : 30, "add_community" : "NO_EXPORT" }, "action": "PERMIT" } ], "_create_time": 1457393635951, "_last_modified_user": "admin", "_system_owned": false, "_last_modified_time": 1457393635951, "_create_user": "admin", "_revision": 0 }

Required Permissions:

crud

Feature:

routing_routers

Additional Errors: