Policy > Networking > Network Services > Advanced Load Balancing > Alb Network Security Policies

Create or update a ALBNetworkSecurityPolicy

If a ALBNetworkSecurityPolicy with the alb-NetworkSecurityPolicy-id is not
already 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:

{ "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+

Example Response:

{ "_create_time": 1598511402402, "_create_user": "admin", "_last_modified_time": 1598511402406, "_last_modified_user": "admin", "_protection": "NOT_PROTECTED", "_revision": 0, "_system_owned": false, "display_name": "test-network_security", "id": "test-network_security", "marked_for_delete": false, "name": "test-network_security", "overridden": false, "parent_path": "/infra", "path": "/infra/alb-network-security-policies/test-network_security", "relative_path": "test-network_security", "resource_type": "ALBNetworkSecurityPolicy", "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 } } ], "unique_id": "a42b0822-2d60-468b-bf35-25837bb25c78" }

Required Permissions:

crud

Feature:

policy_lb

Additional Errors: