namespace AMWD.Net.Api.Cloudflare.Dns
{
///
/// Represents the response data for a DNS Firewall configuration on cloudflare.
///
public class DnsFirewallCluster
{
///
/// The identifier.
///
[JsonProperty("id")]
public string? Id { get; set; }
///
/// Whether to refuse to answer queries for the ANY type.
///
[JsonProperty("deprecate_any_requests")]
public bool? DeprecateAnyRequests { get; set; }
///
/// List of IPs used by DNS Firewall cluster.
///
[JsonProperty("dns_firewall_ips")]
public IReadOnlyCollection? DnsFirewallIps { get; set; }
///
/// Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
///
[JsonProperty("ecs_fallback")]
public bool? EcsFallback { get; set; }
///
///
/// By default, Cloudflare attempts to cache responses for as long as indicated by
/// the TTL received from upstream nameservers.This setting sets an upper bound on
/// this duration.For caching purposes, higher TTLs will be decreased to the
/// maximum value defined by this setting.
///
///
/// This setting does not affect the TTL value in the DNS response Cloudflare
/// returns to clients.Cloudflare will always forward the TTL value received from
/// upstream nameservers.
///
///
[JsonProperty("maximum_cache_ttl")]
public int? MaximumCacheTtl { get; set; }
///
///
/// By default, Cloudflare attempts to cache responses for as long as indicated by
/// the TTL received from upstream nameservers.This setting sets a lower bound on
/// this duration.For caching purposes, lower TTLs will be increased to the minimum
/// value defined by this setting.
///
///
/// This setting does not affect the TTL value in the DNS response Cloudflare
/// returns to clients.Cloudflare will always forward the TTL value received from
/// upstream nameservers.
///
///
///
/// Note that, even with this setting, there is no guarantee that a response will be
/// cached for at least the specified duration.Cached responses may be removed
/// earlier for capacity or other operational reasons.
///
[JsonProperty("minimum_cache_ttl")]
public int? MinimumCacheTtl { get; set; }
///
/// Last modification of DNS Firewall cluster
///
[JsonProperty("modified_on")]
public DateTime? ModifiedOn { get; set; }
///
/// DNS Firewall cluster name.
///
[JsonProperty("name")]
public string? Name { get; set; }
///
///
/// This setting controls how long DNS Firewall should cache negative responses
/// (e.g., NXDOMAIN) from the upstream servers.
///
///
/// This setting does not affect the TTL value in the DNS response Cloudflare
/// returns to clients.Cloudflare will always forward the TTL value received from
/// upstream nameservers.
///
///
[JsonProperty("negative_cache_ttl")]
public int? NegativeCacheTtl { get; set; }
///
/// Ratelimit in queries per second per datacenter
/// (applies to DNS queries sent to the upstream nameservers configured on the cluster).
///
[JsonProperty("ratelimit")]
public int? RateLimit { get; set; }
///
/// Number of retries for fetching DNS responses from upstream nameservers
/// (not counting the initial attempt).
///
[JsonProperty("retries")]
public int? Retries { get; set; }
///
/// Upstream DNS server IPs.
///
[JsonProperty("upstream_ips")]
public IReadOnlyCollection? UpstreamIps { get; set; }
///
/// Attack mitigation settings.
///
[JsonProperty("attack_mitigation")]
public AttackMitigation? AttackMitigation { get; set; }
}
///
/// Attack mitigation settings.
/// Source
///
public class AttackMitigation
{
///
/// When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers.
///
[JsonProperty("enabled")]
public bool? Enabled { get; set; }
///
/// Only mitigate attacks when upstream servers seem unhealthy.
///
[JsonProperty("only_when_upstream_unhealthy")]
public bool? OnlyWhenUpstreamUnhealthy { get; set; }
}
}