{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/NetworkPolicy", "title": "NetworkPolicy", "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid" }, "fq_name": { "type": "array", "items": { "type": "string" } }, "network_policy_entries": { "type": "object", "properties": { "policy_rule": { "type": "array", "items": { "type": "object", "properties": { "direction": { "type": "string", "enum": [ ">", "<>" ], "description": "Traffic direction (unidirectional or bidirectional)." }, "protocol": { "type": "string", "description": "IP protocol (tcp, udp, icmp, any)." }, "action_list": { "type": "object", "properties": { "simple_action": { "type": "string", "enum": [ "pass", "deny" ] }, "apply_service": { "type": "array", "items": { "type": "string" }, "description": "Service chain instance FQN list." } } }, "src_addresses": { "type": "array", "items": { "type": "object", "properties": { "virtual_network": { "type": "string" }, "security_group": { "type": "string" }, "subnet": { "type": "object", "properties": { "ip_prefix": { "type": "string" }, "ip_prefix_len": { "type": "integer" } } } } } }, "dst_addresses": { "type": "array", "items": { "type": "object", "properties": { "virtual_network": { "type": "string" }, "security_group": { "type": "string" } } } }, "src_ports": { "type": "array", "items": { "type": "object", "properties": { "start_port": { "type": "integer" }, "end_port": { "type": "integer" } } } }, "dst_ports": { "type": "array", "items": { "type": "object", "properties": { "start_port": { "type": "integer" }, "end_port": { "type": "integer" } } } } } } } } } } }