list_dfw_rules
Retrieve Distributed Firewall rules in a security policy by policy ID. Returns each rule's action, sources, destinations, services, direction, and sequence, with offset pagination.
Instructions
[READ] List rules in a DFW security policy.
Returns the list envelope: 'items' holds each rule's id, display_name, action, sources, destinations, services, direction, disabled flag and sequence number; 'returned'/'limit'/'truncated'/'hint' say whether the page is complete. 'total' is always null here — a full page reports truncated=true and must be paged with offset; one Application policy can hold thousands of rules. Get policy_id from list_dfw_policies; then get_dfw_rule_stats for a rule's hit counts.
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.
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 | Rules to skip, 0 or more. Pass the previous response's 'next_offset'. | |
| target | No | Optional NSX Manager target from config. | |
| policy_id | Yes | Parent policy identifier. |