NSX-T Data Center REST API
Add a NAT rule in a specific logical router (Deprecated)
Add a NAT rule in a specific logical router.Request:
Method:
POST
URI Path(s):
/api/v1/logical-routers/{logical-router-id}/nat/rules
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
NatRule+
Example Request:
POST https://<nsx-mgr>/api/v1/logical-routers/1977d30c-eee2-11e4-874d-0050569c7004/nat/rules { "action": "SNAT", "match_source_network": "192.168.1.1", "translated_network": "10.117.5.19", "match_service": { "resource_type": "L4PortSetNSService", "source_ports": ["9000"], "destination_ports": ["9000"], "l4_protocol": "TCP" }, "enabled": false }Successful Response:
Response Code:
201 Created
Response Headers:
Location
Content-type: application/json
Content-type: application/json
Response Body:
NatRule+