create_dfw_policy
Create a new empty DFW security policy to serve as a container for firewall rules, with configurable category, priority, and stateful tracking. Rules can then be added separately.
Instructions
[WRITE] Create a new DFW security policy.
Returns the created policy dict (id, path, category, ...), else {"error", "hint"}. The policy is an empty container — rules must be added afterwards with create_dfw_rule.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Optional NSX Manager target from config. | |
| category | No | Ethernet, Emergency, Infrastructure, Environment or Application (default Application); sets DFW evaluation order, Ethernet first, Application last. | Application |
| stateful | No | Track connection state (default True). | |
| policy_id | Yes | Unique policy id (alphanumerics, hyphens, underscores). | |
| description | No | Optional description. | |
| display_name | Yes | Human-readable name. | |
| sequence_number | No | Priority; lower = higher priority (default 10). |