NSX-T Data Center REST API
Add multiple NAT rules in a specific logical router (Deprecated)
Create multiple NAT rules in a specific logical router.The API succeeds only when all rules are accepted and created successfully.
Any one validation voilation will fail the API, no rule will be created.
The ruleIds of each rules can be found from the responsed message.
Deprecated:
Please use below hierarchical Policy API to create multiple nat rule.
POST /policy/api/v1/infra/
Request:
Method:
POST
URI Path(s):
/api/v1/logical-routers/{logical-router-id}/nat/rules?action=create_multiple
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
NatRuleList+
Example Request:
{ "rules" : [ { "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 }, { "action": "SNAT", "match_source_network": "192.168.1.2", "translated_network": "10.117.6.88", "match_service": { "resource_type": "L4PortSetNSService", "source_ports": ["9001"], "destination_ports": ["9001"], "l4_protocol": "TCP" }, "enabled": false } ] }Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
NatRuleList+