Google Domains exposes an API to change Dynamic DNS synthetic records. By sending a POST (or GET) request to a specific URL with the scheme https://username:password@domains.google.com/nic/update?hostname=subdomain.yourdomain.com&myip=1.2.3.4, Google will theoretically add an A record or AAAA record with the specified IP address... but not both at the same time.
I seem to be unable to create both an A record (for IPv4 traffic) and an AAAA record (for IPv6 traffic); I just switch from one to the other, like so:
roger@computer:~$ curl -6 -X POST -d "hostname=<subdomain>&myip=<ipv4 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv4 address>
roger@computer:~$ curl -6 -X POST -d "hostname=<subdomain>&myip=<ipv6 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv6 address>
roger@computer:~$ curl -4 -X POST -d "hostname=<subdomain>&myip=<ipv6 address>" https://<username>:<password>@domains.google.com/nic/update
nochg <ipv6 address>
roger@computer:~$ curl -4 -X POST -d "hostname=<subdomain>&myip=<ipv4 address>" https://<username>:<password>@domains.google.com/nic/update
good <ipv4 address>
After all these, the record that remains is an A record for my IPv4 address, with no AAAA record.
Is there a way to create both records for a dual-stack machine?