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
TypeDnsRecordTypeThe DNS record type.
NamestringThe record name (hostname).
ContentstringThe record content.
TtlintTime to live in seconds.
Proxiedbool?Whether to proxy the record.
CommentstringOptional comment.
TagsIReadOnlyList<string>Optional tags.
Priorityint?Record priority (MX, SRV).
SettingsDnsRecordSettingsOptional 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
Content
The record content.
[JsonPropertyName("content")]
public string Content { get; init; }
Property Value
Name
The record name (hostname).
[JsonPropertyName("name")]
public string Name { get; init; }
Property Value
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
Tags
Optional tags.
[JsonPropertyName("tags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyList<string>? Tags { get; init; }
Property Value
Ttl
Time to live in seconds.
[JsonPropertyName("ttl")]
public int Ttl { get; init; }
Property Value
Type
The DNS record type.
[JsonPropertyName("type")]
public DnsRecordType Type { get; init; }