Table of Contents

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

Name string

Filter by exact domain name match.

Status ZoneStatus?

Filter by zone status (e.g., active, pending).

AccountId string

Filter by account ID. Use this for multi-account scenarios.

AccountName string

Filter by account name.

Page int?

The page number for pagination (1-based).

PerPage int?

The number of results per page (1-50, default 20).

Order ZoneOrderField?

The field to order results by.

Direction ListOrderDirection?

The sort direction (ascending or descending).

Match FilterMatch?

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

string

AccountName

Filter by account name.

public string? AccountName { get; init; }

Property Value

string

Direction

The sort direction (ascending or descending).

public ListOrderDirection? Direction { get; init; }

Property Value

ListOrderDirection?

Match

How to combine multiple filters: "all" (AND) or "any" (OR).

public FilterMatch? Match { get; init; }

Property Value

FilterMatch?

Name

Filter by exact domain name match.

public string? Name { get; init; }

Property Value

string

Order

The field to order results by.

public ZoneOrderField? Order { get; init; }

Property Value

ZoneOrderField?

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; }

Property Value

ZoneStatus?

See Also