create_nat_rule
Create a NAT rule on a Tier-1 gateway's USER NAT section to translate source or destination IPs for SNAT, DNAT, or other NAT actions.
Instructions
[WRITE] Create a NAT rule on a Tier-1 gateway's USER NAT section.
Run list_tier1_gateways for tier1_id and list_nat_rules to avoid an id clash ā the same rule_id overwrites. The gateway must have an edge cluster (see create_tier1_gateway) or NAT cannot be realized, and TIER1_NAT advertisement must be set via update_tier1_gateway for the translated address to be reachable from outside. Returns the created rule dict, else {"error", "hint"}. Then confirm with list_nat_rules; delete_nat_rule is the inverse.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | "DNAT" (default), "SNAT", "REFLEXIVE", "NO_SNAT", "NO_DNAT", or "NAT64". | DNAT |
| target | No | NSX Manager target from config (default if omitted). | |
| rule_id | Yes | Unique ID for the NAT rule. | |
| tier1_id | Yes | Gateway ID, as returned by list_tier1_gateways. | |
| source_network | No | Source CIDR (required for SNAT). | |
| translated_network | No | Translated network/IP (required for all three). | |
| destination_network | No | Destination CIDR (required for DNAT). |