Table of Contents

Class UpdateDnsRecordRequest

Namespace
Cloudflare.NET.Dns.Models
Assembly
Cloudflare.NET.dll

Request to fully replace a DNS record (PUT).

All required fields must be provided. This performs a complete replacement of the record at the specified ID.

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

Remarks

Use PatchDnsRecordRequest for partial updates when you only want to change specific fields without affecting others.

Constructors

UpdateDnsRecordRequest(DnsRecordType, string, string, int, bool?, string?, IReadOnlyList<string>?, int?, DnsRecordSettings?)

Request to fully replace a DNS record (PUT).

All required fields must be provided. This performs a complete replacement of the record at the specified ID.

public UpdateDnsRecordRequest(DnsRecordType Type, string Name, string Content, int Ttl = 1, bool? Proxied = null, string? Comment = null, IReadOnlyList<string>? Tags = null, int? Priority = null, DnsRecordSettings? Settings = null)

Parameters

Type DnsRecordType

The DNS record type.

Name string

The record name (hostname).

Content string

The record content.

Ttl int

Time to live in seconds.

Proxied bool?

Whether to proxy the record.

Comment string

Optional comment.

Tags IReadOnlyList<string>

Optional tags.

Priority int?

Record priority (MX, SRV).

Settings DnsRecordSettings

Optional settings.

Remarks

Use PatchDnsRecordRequest for partial updates when you only want to change specific fields without affecting others.

Properties

Comment

Optional comment.

[JsonPropertyName("comment")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Comment { get; init; }

Property Value

string

Content

The record content.

[JsonPropertyName("content")]
public string Content { get; init; }

Property Value

string

Name

The record name (hostname).

[JsonPropertyName("name")]
public string Name { get; init; }

Property Value

string

Priority

Record priority (MX, SRV).

[JsonPropertyName("priority")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Priority { get; init; }

Property Value

int?

Proxied

Whether to proxy the record.

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

Property Value

bool?

Settings

Optional settings.

[JsonPropertyName("settings")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DnsRecordSettings? Settings { get; init; }

Property Value

DnsRecordSettings

Tags

Optional tags.

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

Property Value

IReadOnlyList<string>

Ttl

Time to live in seconds.

[JsonPropertyName("ttl")]
public int Ttl { get; init; }

Property Value

int

Type

The DNS record type.

[JsonPropertyName("type")]
public DnsRecordType Type { get; init; }

Property Value

DnsRecordType