22
33from __future__ import annotations
44
5- from typing_extensions import TypedDict
5+ from typing_extensions import Literal , Required , TypedDict
66
7- from .dns_setting_param import DNSSettingParam
8-
9- __all__ = ["SettingEditParams" ]
7+ __all__ = ["SettingEditParams" , "ZoneDefaults" , "ZoneDefaultsNameservers" , "ZoneDefaultsSOA" ]
108
119
1210class SettingEditParams (TypedDict , total = False ):
@@ -16,4 +14,83 @@ class SettingEditParams(TypedDict, total=False):
1614 zone_id : str
1715 """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID."""
1816
19- zone_defaults : DNSSettingParam
17+ zone_defaults : ZoneDefaults
18+
19+
20+ class ZoneDefaultsNameservers (TypedDict , total = False ):
21+ type : Required [Literal ["cloudflare.standard" , "cloudflare.standard.random" , "custom.account" , "custom.tenant" ]]
22+ """Nameserver type"""
23+
24+
25+ class ZoneDefaultsSOA (TypedDict , total = False ):
26+ expire : Required [float ]
27+ """
28+ Time in seconds of being unable to query the primary server after which
29+ secondary servers should stop serving the zone.
30+ """
31+
32+ min_ttl : Required [float ]
33+ """The time to live (TTL) for negative caching of records within the zone."""
34+
35+ mname : Required [str ]
36+ """The primary nameserver, which may be used for outbound zone transfers."""
37+
38+ refresh : Required [float ]
39+ """
40+ Time in seconds after which secondary servers should re-check the SOA record to
41+ see if the zone has been updated.
42+ """
43+
44+ retry : Required [float ]
45+ """
46+ Time in seconds after which secondary servers should retry queries after the
47+ primary server was unresponsive.
48+ """
49+
50+ rname : Required [str ]
51+ """
52+ The email address of the zone administrator, with the first label representing
53+ the local part of the email address.
54+ """
55+
56+ ttl : Required [float ]
57+ """The time to live (TTL) of the SOA record itself."""
58+
59+
60+ class ZoneDefaults (TypedDict , total = False ):
61+ flatten_all_cnames : bool
62+ """Whether to flatten all CNAME records in the zone.
63+
64+ Note that, due to DNS limitations, a CNAME record at the zone apex will always
65+ be flattened.
66+ """
67+
68+ foundation_dns : bool
69+ """Whether to enable Foundation DNS Advanced Nameservers on the zone."""
70+
71+ multi_provider : bool
72+ """
73+ Whether to enable multi-provider DNS, which causes Cloudflare to activate the
74+ zone even when non-Cloudflare NS records exist, and to respect NS records at the
75+ zone apex during outbound zone transfers.
76+ """
77+
78+ nameservers : ZoneDefaultsNameservers
79+ """
80+ Settings determining the nameservers through which the zone should be available.
81+ """
82+
83+ ns_ttl : float
84+ """The time to live (TTL) of the zone's nameserver (NS) records."""
85+
86+ secondary_overrides : bool
87+ """
88+ Allows a Secondary DNS zone to use (proxied) override records and CNAME
89+ flattening at the zone apex.
90+ """
91+
92+ soa : ZoneDefaultsSOA
93+ """Components of the zone's SOA record."""
94+
95+ zone_mode : Literal ["standard" , "cdn_only" , "dns_only" ]
96+ """Whether the zone mode is a regular or CDN/DNS only zone."""
0 commit comments