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.
Deprecated: This API has been deprecated, please use below Policy APIs
PATCH /policy/api/v1/infra/tier-0s/<tier-0-id>/nat/<nat-id>/nat-rules/<nat-rule-id>
PATCH /policy/api/v1/infra/tier-1s/<tier-1-id>/nat/<nat-id>/nat-rules/<nat-rule-id>
PATCH /policy/api/v1/orgs/<org-id>/projects/<project-id>/infra/tier-1s/<tier-1-id>/nat/<nat-id>/nat-rules/<nat-rule-id>

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:

{ "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
Response Body:
NatRule+

Example Response:

{ "resource_type": "NatRule", "id": "1029", "display_name": "01003000-0000-0405-0000-000000000018", "match_source_network": "192.168.1.1", "action": "SNAT", "logging": false, "match_service": { "resource_type": "L4PortSetNSService", "destination_ports": [ "9000" ], "l4_protocol": "TCP", "source_ports": [ "9000" ] }, "rule_priority": 1024, "translated_network": "10.117.5.19", "enabled": false, "nat_pass": true, "_last_modified_time": 1458852877750, "_create_time": 1458852877750, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 }

Required Permissions:

crud

Feature:

routing_nat

Additional Errors: