nserver.records 🔗
A 🔗
Bases: RecordBase
Ipv4 Address (A
) Record.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
ip |
Union[str, IPv4Address]
|
IPv4 address of the resource |
required |
ttl |
int
|
record time-to-live in seconds |
300
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
AAAA 🔗
Bases: RecordBase
Ipv6 Address (AAAA
) Record.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
ip |
Union[str, IPv6Address]
|
IPv6 address of the resource |
required |
ttl |
int
|
record time-to-live in seconds |
300
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
CAA 🔗
Bases: RecordBase
Certificate Authority Authorisation (CAA
) Record
See also
- https://datatracker.ietf.org/doc/html/rfc6844
- https://support.dnsimple.com/articles/caa-record/
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
domain name this record applies to |
required |
flags |
int
|
8bit numbers for flags |
required |
tag |
str
|
type of CAA record |
required |
value |
str
|
value for given tag (see RFC for more info) |
required |
ttl |
int
|
record time-to-live in seconds |
3600
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
CNAME 🔗
Bases: RecordBase
Canonical Name (CNAME
) Record.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
domain |
str
|
canonical domain for this |
required |
ttl |
int
|
record time-to-live in seconds |
300
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
MX 🔗
Bases: RecordBase
Mail Exchange (MX
) Record
See also
- https://datatracker.ietf.org/doc/html/rfc1035#section-3.3.9
- https://en.wikipedia.org/wiki/MX_record
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
domain |
str
|
DNS name of mail exchange. Note: |
required |
priority |
int
|
mail exchange priority ( |
10
|
ttl |
int
|
record time-to-live in seconds |
300
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
NS 🔗
Bases: CNAME
Name Server (NS
) Record.
See also
- https://datatracker.ietf.org/doc/html/rfc1035#section-3.3.11
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
domain |
str
|
domain name of the Name Server |
required |
ttl |
int
|
record time-to-live in seconds |
3600
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
PTR 🔗
Bases: CNAME
Pointer (PTR
) Record.
See also
- https://datatracker.ietf.org/doc/html/rfc1035#section-3.3.12
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
domain |
str
|
domain to point to |
required |
ttl |
int
|
record time-to-live in seconds |
300
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
RecordBase 🔗
Base class for all DNS records.
Note: MUST NOT be used directly
Subclasses must set _record_kwargs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
ttl |
int
|
record time-to-live in seconds |
required |
to_resource_record 🔗
Convert Record to a dnslib Resource Record
SOA 🔗
SOA(
zone_name: str,
primary_name_server: str,
admin_email: str,
zone_serial: int,
refresh_period: int = 86400,
retry_period: int = 7200,
expires: int = 3600000,
minimum_ttl: int = 172800,
ttl: int = 3600,
)
Bases: RecordBase
Start of Authority (`SOA``) Record
See also
- https://datatracker.ietf.org/doc/html/rfc1035#section-3.3.13
- https://en.wikipedia.org/wiki/SOA_record
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zone_name |
str
|
name of the DNS zone |
required |
primary_name_server |
str
|
domain name of primary name server for this domain |
required |
admin_email |
str
|
Domain encoded email address of the administrator responsible for this zone. The part of the email address before the @ becomes the first label of the name; the domain name after the @ becomes the rest of the name. In zone-file format, dots in labels are escaped with backslashes; thus the email address john.doe@example.com would be represented in a zone file as john.doe.example.com.) |
required |
zone_serial |
int
|
Serial number for this zone. If a secondary name server following this one observes an increase in this number, the follower will assume that the zone has been updated and initiate a zone transfer. |
required |
refresh_period |
int
|
Number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes. Recommendation for small and stable zones: 86400 seconds (24 hours). |
86400
|
retry_period |
int
|
Number of seconds after which secondary name servers should retry to request the serial number from the master if the master does not respond. It must be less than Refresh. Recommendation for small and stable zones: 7200 seconds (2 hours). |
7200
|
expires |
int
|
Number of seconds after which secondary name servers should stop answering request for this zone if the master does not respond. This value must be bigger than the sum of Refresh and Retry. Recommendation for small and stable zones: 3600000 seconds (1000 hours). |
3600000
|
minimum_ttl |
int
|
Used in calculating the time to live for purposes of negative caching. Authoritative name servers take the smaller of the SOA TTL and the SOA MINIMUM to send as the SOA TTL in negative responses. Resolvers use the resulting SOA TTL to understand for how long they are allowed to cache a negative response. Recommendation for small and stable zones: 172800 seconds (2 days) |
172800
|
ttl |
int
|
record time-to-live in seconds |
3600
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
SRV 🔗
Bases: RecordBase
Service (SRV
) Record
See also
- https://datatracker.ietf.org/doc/html/rfc2782
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
Full name of service in |
required |
target |
str
|
domain name of target host |
required |
port |
int
|
port on target host |
required |
priority |
int
|
priority of target host. |
required |
weight |
int
|
relative weight of this |
required |
ttl |
int
|
record time-to-live in seconds |
300
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record
TXT 🔗
Bases: RecordBase
Text (TXT
) Record
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_name |
str
|
DNS resource name |
required |
text |
str
|
value of the record |
required |
ttl |
int
|
record time-to-live in seconds |
300
|
to_resource_record 🔗
Convert Record to a dnslib Resource Record