Class ListZonesFilters
- Namespace
- Cloudflare.NET.Zones.Models
- Assembly
- Cloudflare.NET.dll
Filters for listing Zones.
All filter properties are optional. When multiple filters are specified, they are combined according to the Match parameter.
public record ListZonesFilters : IEquatable<ListZonesFilters>
- Inheritance
-
ListZonesFilters
- Implements
- Inherited Members
Examples
// List active zones
var filters = new ListZonesFilters(Status: ZoneStatus.Active);
// List zones with pagination
var filters = new ListZonesFilters(Page: 1, PerPage: 50);
// List zones for a specific account, sorted by name
var filters = new ListZonesFilters(
AccountId: "account-id",
Order: ZoneOrderField.Name,
Direction: ListOrderDirection.Ascending
);
Constructors
ListZonesFilters(string?, ZoneStatus?, string?, string?, int?, int?, ZoneOrderField?, ListOrderDirection?, FilterMatch?)
Filters for listing Zones.
All filter properties are optional. When multiple filters are specified, they are combined according to the Match parameter.
public ListZonesFilters(string? Name = null, ZoneStatus? Status = null, string? AccountId = null, string? AccountName = null, int? Page = null, int? PerPage = null, ZoneOrderField? Order = null, ListOrderDirection? Direction = null, FilterMatch? Match = null)
Parameters
NamestringFilter by exact domain name match.
StatusZoneStatus?Filter by zone status (e.g., active, pending).
AccountIdstringFilter by account ID. Use this for multi-account scenarios.
AccountNamestringFilter by account name.
Pageint?The page number for pagination (1-based).
PerPageint?The number of results per page (1-50, default 20).
OrderZoneOrderField?The field to order results by.
DirectionListOrderDirection?The sort direction (ascending or descending).
MatchFilterMatch?How to combine multiple filters: "all" (AND) or "any" (OR).
Examples
// List active zones
var filters = new ListZonesFilters(Status: ZoneStatus.Active);
// List zones with pagination
var filters = new ListZonesFilters(Page: 1, PerPage: 50);
// List zones for a specific account, sorted by name
var filters = new ListZonesFilters(
AccountId: "account-id",
Order: ZoneOrderField.Name,
Direction: ListOrderDirection.Ascending
);
- See Also
Properties
AccountId
Filter by account ID. Use this for multi-account scenarios.
public string? AccountId { get; init; }
Property Value
AccountName
Filter by account name.
public string? AccountName { get; init; }
Property Value
Direction
The sort direction (ascending or descending).
public ListOrderDirection? Direction { get; init; }
Property Value
Match
How to combine multiple filters: "all" (AND) or "any" (OR).
public FilterMatch? Match { get; init; }
Property Value
Name
Filter by exact domain name match.
public string? Name { get; init; }
Property Value
Order
The field to order results by.
public ZoneOrderField? Order { get; init; }
Property Value
Page
The page number for pagination (1-based).
public int? Page { get; init; }
Property Value
- int?
PerPage
The number of results per page (1-50, default 20).
public int? PerPage { get; init; }
Property Value
- int?
Status
Filter by zone status (e.g., active, pending).
public ZoneStatus? Status { get; init; }