create_dfw_policy
Create a new Distributed Firewall security policy, defining its category, priority, and stateful tracking. This creates an empty policy container ready for DFW rules to 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.
Args: policy_id: Unique policy id (alphanumerics, hyphens, underscores). display_name: Human-readable name. category: Ethernet, Emergency, Infrastructure, Environment or Application (default Application); sets DFW evaluation order, Ethernet first, Application last. sequence_number: Priority; lower = higher priority (default 10). stateful: Track connection state (default True). description: Optional description. target: Optional NSX Manager target from config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| category | No | Application | |
| stateful | No | ||
| policy_id | Yes | ||
| description | No | ||
| display_name | Yes | ||
| sequence_number | No |