Management Plane API > Networking > Logical Routing And Services > NAT

List NAT rules of the logical router

Returns paginated list of all user defined NAT rules of the specific
logical router. If a rule_type is provided, only the given type of
rules will be returned. If no rule_type is specified, the rule_type
will be defaulted to NATv4, i.e. only the NATv4 rules will be listed.

Request:

Method:
GET
URI Path(s):
/api/v1/logical-routers/<logical-router-id>/nat/rules
Request Headers:
n/a
Query Parameters:
NatRuleTypeParameter+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/logical-routers/1977d30c-eee2-11e4-874d-0050569c7004/nat/rules?rule_type=ALL

Successful Response:

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

Example Response:

{ "cursor": "003601003000-0000-0404-0000-0000000000181024", "sort_by": "rule_priority", "result_count": 1, "results": [ { "resource_type": "NatRule", "id": "1028", "display_name": "01003000-0000-0404-0000-000000000018", "match_source_network": "80.80.80.1", "action": "SNAT", "logging": false, "translated_ports": "", "match_service": { "resource_type": "L4PortSetNSService", "destination_ports": [ "80", "8080" ], "l4_protocol": "TCP", "source_ports": [] }, "rule_priority": 1024, "translated_network": "172.16.10.10", "enabled": true, "nat_pass": true, "_last_modified_time": 1458852632857, "_create_time": 1458852302781, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 3 } ] }

Required Permissions:

read

Feature:

routing_nat

Additional Errors: