Management Plane API > Networking > Services > Policy Based Routing

Add Multiple Rules in a Section

Create multiple PBR rules in existing PBR section bounded by
limit of 1000 PBR rules per section.

Request:

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

Example Request:

POST https://<nsx-mgr>/api/v1/pbr/sections/2111d18f-27ba-4f19-a51d-2173c3972410/rules?action=create_multiple { "rules" : [ { "id": "1430528", "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 }, { "id": "1430529", "display_name": "PBR-S3-vpc-5b4cf63d", "sources": [ { "target_display_name": "S3", "is_valid": true, "target_type": "IPSet", "target_id": "abcbbc9f-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:
PBRRuleList+

Example Response:

{ "rules": [ { "id": "1430528", "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": 3 }, { "id": "1430529", "display_name": "PBR-S3-vpc-5b4cf63d", "sources": [ { "target_display_name": "S3", "is_valid": true, "target_type": "IPSet", "target_id": "abcbbc9f-6eae-4009-b709-532820dbba2a" } ], "logged": false, "action": "ROUTE_TO_UNDERLAY_NAT", "disabled": false, "_revision": 3 } ] }

Required Permissions:

crud

Feature:

pbr

Additional Errors: