> ## Documentation Index
> Fetch the complete documentation index at: https://datum-4926dda5-docs-api-reference-demo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DNSRecordSet

> DNSRecordSet is the Schema for the dnsrecordsets API.

<Note>
  API resource reference for **DNSRecordSet**, part of the [DNS service](/api/dns/overview). To create or change one, see [Changing resources](/datumctl/resources/changing); to read or inspect, see [Reading resources](/datumctl/resources/reading). For the underlying concept, see [Domains & DNS](/domain-dns/dns).
</Note>

<Warning>
  This resource is part of an **alpha** API (`v1alpha1`). Fields and behavior are subject to change without notice.
</Warning>

## Identity

|         |                               |
| ------- | ----------------------------- |
| Group   | `dns.networking.miloapis.com` |
| Version | `v1alpha1`                    |
| Kind    | `DNSRecordSet`                |
| Scope   | Project                       |

## Overview

A `DNSRecordSet` defines a set of DNS resource records of a single type (for example, `A`, `AAAA`, `CNAME`, or `TXT`) within a DNS zone. Each recordset references the `DNSZone` it belongs to and carries one or more owner names, each with values appropriate for the record type. Use it to publish and manage the DNS records that resolve names in a zone you own.

## Spec fields

| Field                          | Type      | Required | Description                                                                                                    |
| ------------------------------ | --------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| `spec.dnsZoneRef`              | Object    | Yes      | DNSZoneRef references the DNSZone this recordset belongs to.                                                   |
| `spec.dnsZoneRef.name`         | string    | No       | Name of the referent DNSZone.                                                                                  |
| `spec.recordType`              | string    | Yes      | The DNS RR type for this recordset. One of the enum values `A`, `AAAA`, `ALIAS`, `CNAME`, and others.          |
| `spec.records`                 | \[]Object | Yes      | One or more owner names with values appropriate for the RecordType.                                            |
| `spec.records[].name`          | string    | Yes      | The owner name (relative to the zone or FQDN).                                                                 |
| `spec.records[].ttl`           | integer   | No       | Optionally overrides the TTL for this owner/RRset.                                                             |
| `spec.records[].a`             | Object    | No       | Value for an `A` record. Exactly one type-specific field should be set matching RecordType.                    |
| `spec.records[].a.content`     | string    | Yes\*    | The record value. Required when the `a` object is set.                                                         |
| `spec.records[].aaaa`          | Object    | No       | Value for an `AAAA` record.                                                                                    |
| `spec.records[].alias`         | Object    | No       | Value for an ALIAS/ANAME-style record; content is a hostname (FQDN or relative) with an optional trailing dot. |
| `spec.records[].caa`           | Object    | No       | Value for a `CAA` record.                                                                                      |
| `spec.records[].cname`         | Object    | No       | Value for a `CNAME` record.                                                                                    |
| `spec.records[].cname.content` | string    | Yes\*    | The record value. Required when the `cname` object is set.                                                     |
| `spec.records[].https`         | Object    | No       | Value for an `HTTPS` record.                                                                                   |
| `spec.records[].mx`            | Object    | No       | Value for an `MX` record.                                                                                      |
| `spec.records[].ns`            | Object    | No       | Value for an `NS` record.                                                                                      |
| `spec.records[].ptr`           | Object    | No       | Value for a `PTR` record.                                                                                      |
| `spec.records[].soa`           | Object    | No       | Value for an `SOA` record.                                                                                     |
| `spec.records[].srv`           | Object    | No       | Value for an `SRV` record.                                                                                     |
| `spec.records[].svcb`          | Object    | No       | Value for an `SVCB` record.                                                                                    |
| `spec.records[].tlsa`          | Object    | No       | Value for a `TLSA` record.                                                                                     |
| `spec.records[].txt`           | Object    | No       | Value for a `TXT` record.                                                                                      |
| `spec.records[].txt.content`   | string    | Yes\*    | The record value. Required when the `txt` object is set.                                                       |

<Info>
  Within each entry in `spec.records`, exactly one type-specific object (`a`, `aaaa`, `cname`, `txt`, and so on) should be set, matching `spec.recordType`. Fields marked Yes\* are required only when their parent type-specific object is present.
</Info>

## Status fields (read-only)

| Field               | Type      | Description                                          |
| ------------------- | --------- | ---------------------------------------------------- |
| `status.conditions` | \[]Object | Includes `Accepted` and `Programmed` readiness.      |
| `status.recordSets` | \[]Object | Captures per-owner (per name) status and conditions. |

## Usage

```yaml theme={null}
apiVersion: dns.networking.miloapis.com/v1alpha1
kind: DNSRecordSet
metadata:
  name: www-a
spec:
  dnsZoneRef:
    name: example-com
  recordType: A
  records:
    - name: www
      ttl: 300
      a:
        content: 203.0.113.10
```

```bash theme={null}
# Apply the recordset
datumctl apply -f dnsrecordset.yaml --project my-project

# List DNS recordsets in the project
datumctl get dnsrecordsets --project my-project

# Inspect a specific recordset
datumctl describe dnsrecordset www-a --project my-project
```

<Tip>
  Run `datumctl explain dnsrecordsets --recursive` to see the full, live field tree for this resource.
</Tip>
