NSX-T Data Center REST API
Create or update a Nat Rule
If a NAT Rule is not already present on VPC denoted by VPC ID,under NAT section denoted by <nat-id>, create a new NAT Rule.
If it already exists, update the NAT Rule.
Under VPC there will be 2 different NATs(sections).
(USER and NAT64)
For more details related to NAT section please refer to PolicyNAT schema.
Request:
Method:
PATCH
URI Path(s):
/policy/api/v1/orgs/{org-id}/projects/{project-id}/vpcs/{vpc-id}/nat/{nat-id}/nat-rules/{nat-rule-id}
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
PolicyVpcNatRule+
Example Request:
PATCH https://<policy-mgr>/policy/api/v1/orgs/org1/projects/project1/vpcs/vpc1/nat/USER/nat-rules/MyNATRuleDemo { "display_name" : "MyNATRuleDemo", "description" : "Example of a NAT rule", "action" : "DNAT", "destination_network" : "10.117.5.19", "translated_network" : "192.168.1.1", "sequence_number" : 10, "enabled" : true, "logging" : false }Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a