Getting startedGuidesReferenceChangelog
Apoxy:// Docs / Reference / DomainRecord

DomainRecord

API reference for Domain Records (core.apoxy.dev/v1alpha3)

API Group: core.apoxy.dev/v1alpha3

Operations

List Domain Records

GET/apis/core.apoxy.dev/v1alpha3/domainrecords

List DomainRecord

Response

  • 200: OK

Create Domain Record

POST/apis/core.apoxy.dev/v1alpha3/domainrecords

Create a DomainRecord

Request Body

Spec fields (DomainRecordSpec):

FieldTypeDescription
namestringName is the DNS record name (e.g. "example.com", "www.example.com"). (required)
targetDomainRecordTargetTarget specifies the record data. (required)
tlsDomainTLSSpecTLS configures TLS certificate provisioning for this record's domains. Only valid when target.ref is set.
ttlinteger (int32)TTL in seconds. Optional, defaults to 300.
zonestringZone is the name of the DomainZone that manages this record. Optional - empty means standalone (custom domain, not zone-managed).

Response

  • 200: OK
  • 201: Created
  • 202: Accepted

Delete All Domain Records

DELETE/apis/core.apoxy.dev/v1alpha3/domainrecords

Delete collection of DomainRecord

Response

  • 200: OK

Get Domain Record

GET/apis/core.apoxy.dev/v1alpha3/domainrecords/{name}

Get the specified DomainRecord

Response

  • 200: OK

Replace Domain Record

PUT/apis/core.apoxy.dev/v1alpha3/domainrecords/{name}

Replace the specified DomainRecord

Request Body

Spec fields (DomainRecordSpec):

FieldTypeDescription
namestringName is the DNS record name (e.g. "example.com", "www.example.com"). (required)
targetDomainRecordTargetTarget specifies the record data. (required)
tlsDomainTLSSpecTLS configures TLS certificate provisioning for this record's domains. Only valid when target.ref is set.
ttlinteger (int32)TTL in seconds. Optional, defaults to 300.
zonestringZone is the name of the DomainZone that manages this record. Optional - empty means standalone (custom domain, not zone-managed).

Response

  • 200: OK
  • 201: Created

Update Domain Record

PATCH/apis/core.apoxy.dev/v1alpha3/domainrecords/{name}

Partially update the specified DomainRecord

Response

  • 200: OK
  • 201: Created

Delete Domain Record

DELETE/apis/core.apoxy.dev/v1alpha3/domainrecords/{name}

Delete a DomainRecord

Response

  • 200: OK
  • 202: Accepted

Limits

The DNS servers accept a fixed amount of data at one name. The API refuses a DomainRecord that is over these limits:

  • Values - At most 64 values in one DomainRecord, for all fields of target.dns together.
  • Value length - At most 4096 bytes for each value. TXT, DKIM, SPF and DMARC values count in DNS zone file form: each 255-byte string adds two quotes and a space, " and \ count as 2 bytes, and each byte that is not printable ASCII counts as 4 bytes (é is 8 bytes).

A DomainRecord from before these limits keeps its values. An update that changes target.dns must be in the limits.

The 64-value limit also applies to all DomainRecords at one name together. DMARC values count at the _dmarc name. When the DomainRecords at a name have more than 64 values, the DomainRecord gets the condition DNSRecordsAccepted with status False and reason TooManyValues, and the DNS servers can keep the records from before the change. Remove values until the name has 64 or fewer, and the condition goes away. The reason RecordsRefused means that the DNS servers refuse the records for a different cause, which the condition message gives.


Schema Reference

DomainRecordTarget

FieldTypeDescription
dnsDomainRecordTargetDNSDNS specifies the record data directly. Exactly one of DNS or Ref must be set.
refLocalObjectReferenceRef specifies a reference to another object within Apoxy (e.g. Proxy, Gateway, DomainRecord). Exactly one of DNS or Ref must be set.

DomainRecordTargetDNS

FieldTypeDescription
astring[]A holds IPv4 A record addresses.
aaaastring[]AAAA holds IPv6 AAAA record addresses.
caastring[]CAA holds Certification Authority Authorization record values.
dkimstring[]DKIM holds DKIM (DomainKeys Identified Mail) values. Values should be DKIM public key records (e.g. "v=DKIM1; k=rsa; p=...").
dmarcstring[]DMARC holds DMARC values. Values should follow DMARC syntax (e.g. "v=DMARC1; p=reject; rua=mailto:...").
dnskeystring[]DNSKEY holds DNSKEY records for DNSSEC. Values should be DNSKEY record data (e.g. "257 3 8 <base64-encoded-key>").
dsstring[]DS holds DS (Delegation Signer) records for DNSSEC chain of trust. Values should be DS record data (e.g. "12345 8 2 <digest>").
fqdnstringFQDN holds a CNAME record target.
mxstring[]MX holds Mail Exchange record values (e.g. "10 mail.example.com").
nsstring[]NS holds Name Server record values.
spfstring[]SPF holds SPF (Sender Policy Framework) values. Values should follow SPF syntax (e.g. "v=spf1 include:_spf.google.com ~all").
srvstring[]SRV holds Service Locator record values.
txtstring[]TXT holds TXT record values.

LocalObjectReference

FieldTypeDescription
groupstringGroup is the API Group of the referenced object. (required)
namestringName is the name of the referenced object. (required)

DomainTLSSpec

FieldTypeDescription
certificateAuthoritystringThe Certificate Authority used to issue the TLS certificate. Currently supports "letsencrypt".