Class Zone
- Namespace
- Cloudflare.NET.Zones.Models
- Assembly
- Cloudflare.NET.dll
Represents the detailed information for a Cloudflare Zone.
A zone represents a domain and its configuration in Cloudflare. This record captures all properties returned by the Cloudflare API for a zone resource.
public record Zone : IEquatable<Zone>
- Inheritance
-
Zone
- Implements
- Inherited Members
Constructors
Zone(string, string, ZoneStatus, ZoneAccount, DateTime?, DateTime, DateTime, int, IReadOnlyList<string>, IReadOnlyList<string>?, string?, string?, ZoneOwner, ZonePlan, ZoneMeta?, bool, IReadOnlyList<string>?, ZoneType, IReadOnlyList<string>?, string?, string?, ZoneTenant?, ZoneTenantUnit?)
Represents the detailed information for a Cloudflare Zone.
A zone represents a domain and its configuration in Cloudflare. This record captures all properties returned by the Cloudflare API for a zone resource.
public Zone(string Id, string Name, ZoneStatus Status, ZoneAccount Account, DateTime? ActivatedOn, DateTime CreatedOn, DateTime ModifiedOn, int DevelopmentMode, IReadOnlyList<string> NameServers, IReadOnlyList<string>? OriginalNameServers, string? OriginalRegistrar, string? OriginalDnsHost, ZoneOwner Owner, ZonePlan Plan, ZoneMeta? Meta, bool Paused, IReadOnlyList<string>? Permissions, ZoneType Type, IReadOnlyList<string>? VanityNameServers, string? CnameSuffix, string? VerificationKey, ZoneTenant? Tenant, ZoneTenantUnit? TenantUnit)
Parameters
IdstringThe unique identifier for the zone (32-character hexadecimal string).
NamestringThe domain name of the zone (e.g., "example.com").
StatusZoneStatusThe current status of the zone (e.g., active, pending, initializing).
AccountZoneAccountThe account that owns this zone.
ActivatedOnDateTime?The timestamp when the zone was activated. Null if not yet activated.
CreatedOnDateTimeThe timestamp when the zone was created.
ModifiedOnDateTimeThe timestamp when the zone was last modified.
DevelopmentModeintSeconds remaining in development mode. 0 means development mode is off. When enabled, Cloudflare caching is bypassed.
NameServersIReadOnlyList<string>The Cloudflare-assigned nameservers for the zone.
OriginalNameServersIReadOnlyList<string>The nameservers that were on the domain before moving to Cloudflare.
OriginalRegistrarstringThe registrar that manages the domain.
OriginalDnsHoststringThe DNS host that was hosting the domain before moving to Cloudflare.
OwnerZoneOwnerInformation about the user who owns the zone.
PlanZonePlanThe billing plan for the zone.
MetaZoneMetaAdditional metadata about the zone.
PausedboolWhether the zone is paused. When paused, Cloudflare stops proxying traffic.
PermissionsIReadOnlyList<string>The permissions the current API token has on this zone.
TypeZoneTypeThe type of zone setup (full, partial, or secondary).
VanityNameServersIReadOnlyList<string>Custom nameservers configured for the zone (Business/Enterprise only).
CnameSuffixstringThe CNAME suffix for partial zones.
VerificationKeystringThe verification key for the zone.
TenantZoneTenantTenant information for multi-tenant configurations.
TenantUnitZoneTenantUnitTenant unit information for multi-tenant configurations.
- See Also
Properties
Account
The account that owns this zone.
[JsonPropertyName("account")]
public ZoneAccount Account { get; init; }
Property Value
ActivatedOn
The timestamp when the zone was activated. Null if not yet activated.
[JsonPropertyName("activated_on")]
public DateTime? ActivatedOn { get; init; }
Property Value
CnameSuffix
The CNAME suffix for partial zones.
[JsonPropertyName("cname_suffix")]
public string? CnameSuffix { get; init; }
Property Value
CreatedOn
The timestamp when the zone was created.
[JsonPropertyName("created_on")]
public DateTime CreatedOn { get; init; }
Property Value
DevelopmentMode
Seconds remaining in development mode. 0 means development mode is off. When enabled, Cloudflare caching is bypassed.
[JsonPropertyName("development_mode")]
public int DevelopmentMode { get; init; }
Property Value
Id
The unique identifier for the zone (32-character hexadecimal string).
[JsonPropertyName("id")]
public string Id { get; init; }
Property Value
Meta
Additional metadata about the zone.
[JsonPropertyName("meta")]
public ZoneMeta? Meta { get; init; }
Property Value
ModifiedOn
The timestamp when the zone was last modified.
[JsonPropertyName("modified_on")]
public DateTime ModifiedOn { get; init; }
Property Value
Name
The domain name of the zone (e.g., "example.com").
[JsonPropertyName("name")]
public string Name { get; init; }
Property Value
NameServers
The Cloudflare-assigned nameservers for the zone.
[JsonPropertyName("name_servers")]
public IReadOnlyList<string> NameServers { get; init; }
Property Value
OriginalDnsHost
The DNS host that was hosting the domain before moving to Cloudflare.
[JsonPropertyName("original_dnshost")]
public string? OriginalDnsHost { get; init; }
Property Value
OriginalNameServers
The nameservers that were on the domain before moving to Cloudflare.
[JsonPropertyName("original_name_servers")]
public IReadOnlyList<string>? OriginalNameServers { get; init; }
Property Value
OriginalRegistrar
The registrar that manages the domain.
[JsonPropertyName("original_registrar")]
public string? OriginalRegistrar { get; init; }
Property Value
Owner
Information about the user who owns the zone.
[JsonPropertyName("owner")]
public ZoneOwner Owner { get; init; }
Property Value
Paused
Whether the zone is paused. When paused, Cloudflare stops proxying traffic.
[JsonPropertyName("paused")]
public bool Paused { get; init; }
Property Value
Permissions
The permissions the current API token has on this zone.
[JsonPropertyName("permissions")]
public IReadOnlyList<string>? Permissions { get; init; }
Property Value
Plan
The billing plan for the zone.
[JsonPropertyName("plan")]
public ZonePlan Plan { get; init; }
Property Value
Status
The current status of the zone (e.g., active, pending, initializing).
[JsonPropertyName("status")]
public ZoneStatus Status { get; init; }
Property Value
Tenant
Tenant information for multi-tenant configurations.
[JsonPropertyName("tenant")]
public ZoneTenant? Tenant { get; init; }
Property Value
TenantUnit
Tenant unit information for multi-tenant configurations.
[JsonPropertyName("tenant_unit")]
public ZoneTenantUnit? TenantUnit { get; init; }
Property Value
Type
The type of zone setup (full, partial, or secondary).
[JsonPropertyName("type")]
public ZoneType Type { get; init; }
Property Value
VanityNameServers
Custom nameservers configured for the zone (Business/Enterprise only).
[JsonPropertyName("vanity_name_servers")]
public IReadOnlyList<string>? VanityNameServers { get; init; }
Property Value
VerificationKey
The verification key for the zone.
[JsonPropertyName("verification_key")]
public string? VerificationKey { get; init; }