If you have an infrastructure that uses public DNS records and manage it by defining the required state, you can use Cloud DNS as follows:
Create a DNS Zone with Cloud DNS.
Generate a UUID (v3, v4, and v5 supported) for your DNS record.
Add to your infrastructure a PUT call for the desired record configuration with your UUID and assign it to the corresponding DNS zone ID.
Result: On a successful PUT request,
If the record does not exist, Cloud DNS creates the record with the specified configuration.
If a record already exists but with a different configuration, the record is updated.
202 Successful operation
Field | Type | Description | Example |
---|---|---|---|
id
string
UUID of the newly created DNS record
90d81ac0-3a30-44d4-95a5-12959effa6ee
createdDate
string
DNS record creation timestamp
2023-03-15T09:58:59.147746133Z
lastModifiedDate
string
DNS record update timestamp
2023-03-15T09:58:59.147746133Z
zoneId
string
UUID of the DNS zone of the DNS record
2a4428b3-dbe0-4357-9c02-609025b3a40f
fqdn
string
Fully qualified domain name resulting from the record name and the zoneName
app.example.com
state
string
State of the request
CREATED