Management Plane API > Networking > Services > Policy Based Routing

Update an Existing Section with Rules

Modifies an existing PBR section along with its relative position
among other PBR sections with rules. When invoked on a large number
of rules, this API is supported only at low rates of invocation (not more
than 2 times per minute). The typical latency of this API with about 1024
rules is about 15 seconds in a cluster setup. This API should not be
invoked with large payloads at automation speeds.

Instead, to move a section above or below another section, use:
POST /api/v1/pbr/sections/<section-id>?action=revise

To modify rules, use:
PUT /api/v1/pbr/sections/<section-id>/rules/<rule-id>

Request:

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

Example Request:

POST https://<nsx-mgr>/api/v1/pbr/sections/2111d18f-27ba-4f19-a51d-2173c3972410?action=revise_with_rules&operation=insert_after&id=79b29ea5-051a-4ab2-af85-fb6520a9f881 { "id": "2111d18f-27ba-4f19-a51d-2173c3972410", "display_name":"Provides distributed access to cloud services", "_revision": 0. "rules":[ { "display_name":"PBR-RDS-vpc-5b4cf63d", "action":"ROUTE_TO_UNDERLAY_NAT", "destinations": [ { "target_display_name": "RDS-vpc-5b4cf63d", "is_valid": true, "target_type": "IPSet", "target_id": "96ebbc9f-6eae-4009-b709-532820dbba2a" } ] } ] }

Successful Response:

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

Example Response:

{ "resource_type": "PBRSectionRuleList", "id": "2111d18f-27ba-4f19-a51d-2173c3972410", "display_name": "Provides distributed access to cloud services", "rule_count": 1, "rules": [ { "id": "7168", "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": 1 } ], "_last_modified_user": "system", "_last_modified_time": 1446245476635, "_revision": 1 }

Required Permissions:

crud

Feature:

pbr

Additional Errors: