Table of Contents

Class EditZoneRequest

Namespace
Cloudflare.NET.Zones.Models
Assembly
Cloudflare.NET.dll

Request to edit a Zone's properties.

Important: Only one property can be changed per API call. Setting multiple properties in a single request may result in an error.

public record EditZoneRequest : IEquatable<EditZoneRequest>
Inheritance
EditZoneRequest
Implements
Inherited Members

Examples

// Pause a zone
var request = new EditZoneRequest(Paused: true);
var zone = await zonesApi.EditZoneAsync(zoneId, request);

// Change zone type
var request = new EditZoneRequest(Type: ZoneType.Partial);
var zone = await zonesApi.EditZoneAsync(zoneId, request);

Constructors

EditZoneRequest(bool?, ZoneType?, IReadOnlyList<string>?, ZonePlanReference?)

Request to edit a Zone's properties.

Important: Only one property can be changed per API call. Setting multiple properties in a single request may result in an error.

public EditZoneRequest(bool? Paused = null, ZoneType? Type = null, IReadOnlyList<string>? VanityNameServers = null, ZonePlanReference? Plan = null)

Parameters

Paused bool?

Whether to pause the zone. When paused, Cloudflare stops proxying traffic.

Type ZoneType?

The zone type to change to (requires Enterprise plan for some transitions).

VanityNameServers IReadOnlyList<string>

Custom nameservers for the zone (Business/Enterprise only).

Plan ZonePlanReference

The plan to change to. Requires appropriate subscription.

Examples

// Pause a zone
var request = new EditZoneRequest(Paused: true);
var zone = await zonesApi.EditZoneAsync(zoneId, request);

// Change zone type
var request = new EditZoneRequest(Type: ZoneType.Partial);
var zone = await zonesApi.EditZoneAsync(zoneId, request);
See Also

Properties

Paused

Whether to pause the zone. When paused, Cloudflare stops proxying traffic.

[JsonPropertyName("paused")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Paused { get; init; }

Property Value

bool?

Plan

The plan to change to. Requires appropriate subscription.

[JsonPropertyName("plan")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ZonePlanReference? Plan { get; init; }

Property Value

ZonePlanReference

Type

The zone type to change to (requires Enterprise plan for some transitions).

[JsonPropertyName("type")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ZoneType? Type { get; init; }

Property Value

ZoneType?

VanityNameServers

Custom nameservers for the zone (Business/Enterprise only).

[JsonPropertyName("vanity_name_servers")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyList<string>? VanityNameServers { get; init; }

Property Value

IReadOnlyList<string>

See Also