NSX-T Data Center REST API
Create or update a ALBNetworkSecurityPolicy
If a ALBNetworkSecurityPolicy with the alb-NetworkSecurityPolicy-id is notalready present, create a new ALBNetworkSecurityPolicy. If it already exists,
update the ALBNetworkSecurityPolicy. This is a full replace.
This API is only available when using VMware NSX-T.
Request:
Method:
PUT
URI Path(s):
/policy/api/v1/infra/alb-network-security-policies/<alb-networksecuritypolicy-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ALBNetworkSecurityPolicy+
Example Request:
{ "display_name": "test-network_security", "rules": [ { "action": "NETWORK_SECURITY_POLICY_ACTION_TYPE_ALLOW", "age": 0, "created_by": "string", "enable": true, "index": 0, "log": true, "match": { "client_ip": { "addrs": [ { "addr": "1.2.3.4", "type": "V4" } ], "match_criteria": "IS_IN", "prefixes": [ { "ip_addr": { "addr": "1.3.4.5", "type": "V4" }, "mask": 0 } ], "ranges": [ { "begin": { "addr": "1.1.1.1", "type": "V4" }, "end": { "addr": "10.10.10.10", "type": "V4" } } ] }, "vs_port": { "match_criteria": "IS_NOT_IN", "ports": [ 80 ] } }, "name": "rule1", "rl_param": { "burst_size": 0, "max_rate": 20 } } ] }Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ALBNetworkSecurityPolicy+