Policy > Networking > Network Services > NAT > Rules > Tier-1 Gateways

List NAT Rules

List NAT Rules from Tier-1 denoted by Tier-1 ID, under NAT section denoted by <nat-id>. Under tier-1 there will be 3 different NATs(sections). (INTERNAL, USER and DEFAULT) For more details related to NAT section please refer to PolicyNAT schema. This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost) or VMware NSX-T.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/infra/tier-1s/<tier-1-id>/nat/<nat-id>/nat-rules
/policy/api/v1/global-infra/tier-1s/<tier-1-id>/nat/<nat-id>/nat-rules
Request Headers:
n/a
Query Parameters:
PolicyNatRuleListRequestParameters+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/tier-1s/vmc_network-demo/nat/USER/nat-rules

Successful Response:

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

Example Response:

{ "sort_ascending": true, "sort_by": "display_name", "result_count": 3, "results": [ { "resource_type": "PolicyNatRule", "description": "Example of a NAT rule", "id": "MyNATRule", "display_name": "MyNATRule", "path": "/infra/tier-1s/vmc_network-demo/nat/USER/nat-rules/MyNATRule", "parent_path": "/infra/tier-1s/vmc_network-demo/nat/USER", "relative_path": "MyNATRule", "sequence_number": 1, "service": "", "scope": [], "action": "REFLEXIVE", "enabled" : true, "logging" : false, "firewall_match" : "MATCH_EXTERNAL_ADDRESS", "source_network": "10.117.5.73", "translated_network": "192.168.1.1", "_create_user": "admin", "_create_time": 1516015559976, "_last_modified_user": "admin", "_last_modified_time": 1516015559976, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }, { "resource_type": "PolicyNatRule", "description": "Example of a NAT rule", "id": "MyNATRule3", "display_name": "MyNATRule3", "path": "/infra/tier-1s/vmc_network-demo/nat/USER/nat-rules/MyNATRule3", "parent_path": "/infra/tier-1s/vmc_network-demo/nat/USER", "relative_path": "MyNATRule3", "sequence_number": 10, "service": "/infra/services/AD_Server", "scope": [], "action": "DNAT", "enabled" : true, "logging" : false, "firewall_match" : "MATCH_EXTERNAL_ADDRESS", "translated_ports": "80-82", "destination_network": "10.117.5.19", "translated_network": "192.168.1.1", "_create_user": "admin", "_create_time": 1516084472276, "_last_modified_user": "admin", "_last_modified_time": 1516084472276, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }, { "resource_type": "PolicyNatRule", "description": "Example of a NAT rule", "id": "MyNATRuleDemo", "display_name": "MyNATRuleDemo", "path": "/infra/tier-1s/vmc_network-demo/nat/USER/nat-rules/MyNATRuleDemo", "parent_path": "/infra/tier-1s/vmc_network-demo/nat/USER", "relative_path": "MyNATRuleDemo", "sequence_number": 10, "service": "/infra/services/AD_Server", "scope": [ "infra/tier-0s/tier-0-vmc/interfaces/internet" ], "action": "DNAT", "enabled" : true, "logging" : false, "firewall_match" : "MATCH_EXTERNAL_ADDRESS", "translated_ports": "80-82", "destination_network": "10.117.5.19", "translated_network": "192.168.1.1", "_create_user": "admin", "_create_time": 1516181809835, "_last_modified_user": "admin", "_last_modified_time": 1516181809835, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 } ] }

Required Permissions:

read

Feature:

policy_nat_rules

Additional Errors: