Management Plane API > Networking > Services > Policy Based Routing

Add a Single Rule in a Section

Adds a new PBR rule in existing PBR section.

Request:

Method:
POST
URI Path(s):
/api/v1/pbr/sections/<section-id>/rules
Request Headers:
n/a
Query Parameters:
PBRInsertParameters+
Request Body:
PBRRule+

Example Request:

POST https://<nsx-mgr>/api/v1/pbr/sections/2111d18f-27ba-4f19-a51d-2173c3972410/rules { "display_name": "PBR-RDS-vpc-5b4cf63d", "destinations": [ { "target_display_name": "RDS-vpc-5b4cf63d", "is_valid": true, "target_type": "IPSet", "target_id": "96ebbc9f-6eae-4009-b709-532820dbba2a" } ], "logged": false, "action": "ROUTE_TO_UNDERLAY_NAT", "disabled": false }

Successful Response:

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

Example Response:

{ "id": "1799168", "display_name": "PBR-RDS-vpc-5b4cf63d", "destinations": [ { "target_display_name": "RDS-vpc-5b4cf63d", "is_valid": true, "target_type": "IPSet", "target_id": "96ebbc9f-6eae-4009-b709-532820dbba2a" } ], "logged": false, "action": "ROUTE_TO_UNDERLAY_NAT", "disabled": false, "_revision": 0 }

Required Permissions:

crud

Feature:

pbr

Additional Errors: