list_dfw_policies
List DFW security policies in the default domain with pagination and name filtering. Returns policy IDs, display names, categories, sequence numbers, stateful flags, and rule counts.
Instructions
[READ] List DFW security policies in the default domain.
Start here. Returns the list envelope: 'items' holds each policy's id, display_name, category, sequence_number, stateful flag and rule count; 'returned'/'limit'/'total'/'truncated'/'hint' say whether the page is the whole answer — never read a full page as complete, narrow with name_filter or page with offset. Then get_dfw_policy for one policy's detail, or list_dfw_rules for the rules inside.
Page with 'next_offset': pass the value back as 'offset' and stop when it is null. Do not loop on 'truncated' — that says this page is not the whole collection, which stays true on the last page of a walk.
'rule_count' is null when NSX did not report one — that means "not retrieved", NOT "no rules", so do not conclude a null policy enforces nothing; call list_dfw_rules on it. Passing name_filter makes every count null (it is resolved via the Policy Search API, which carries no rule counts). A null anywhere adds 'rule_count_note' to the envelope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Page size, 1..1000 (default 50). Not a way to ask for everything — 0 or negative is rejected. | |
| offset | No | Matched policies to skip, 0 or more. Pass the previous response's 'next_offset'. | |
| target | No | NSX Manager target name from config; default if omitted. | |
| name_filter | No | Substring/glob match on policy display_name. |