NSX-T Data Center REST API
Add RouteMap on a Logical Router (Deprecated)
Adds a new RouteMap on a Logical RouterDeprecated:
Please use below Policy APIs.
POST /policy/api/v1/infra/tier-0s/<tier-0-id>/route-maps/<route-maps-id>
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:
{ "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+