Skip to main content
Version: 0.0.25

Table: resource_record_set

Table to manage AWS Route 53 recordsets. After you create a hosted zone for your domain, such as example.com, you create records to tell the Domain Name System (DNS) how you want traffic to be routed for that domain. Each record includes the name of a domain or a subdomain, a record type (for example, a record with a type of MX routes email), and other information applicable to the record type (for MX records, the host name of one or more mail servers and a priority for each server).

Example

INSERT INTO resource_record_set (name, record_type, record, ttl, parent_hosted_zone_id) SELECT 'name', 'CNAME', 'domain.com.', 300, id
FROM hosted_zone WHERE domain_name = 'domain.com.';

SELECT * FROM resource_record_set INNER JOIN hosted_zone ON hosted_zone.id = parent_hosted_zone_id WHERE domain_name = 'domain.com.';

DELETE FROM resource_record_set USING hosted_zone WHERE hosted_zone.id IN (SELECT id FROM hosted_zone WHERE domain_name = 'domain.com.' ORDER BY ID DESC LIMIT 1);

See

Columns

Optional alias_target: alias_target

Reference to the alias target for this record

name: string

Name for the recordset

parent_hosted_zone: hosted_zone

Reference to the hosted zone for this record

Optional record: string

Content for the record to create. Content will depend on the type of record to create

See

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-basic.html#rrsets-values-basic-value

record_type: record_type

Type of record to create

Optional ttl: number

The amount of time, in seconds, that you want DNS recursive resolvers to cache information about this record

See

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-basic.html#rrsets-values-basic-ttl