On this page:
r53-endpoint
create-hosted-zone
delete-hosted-zone
list-hosted-zones
get-hosted-zone
domain-name->zone-id
list-resource-record-sets
change-resource-record-sets

10 Route 53 (DNS)

 (require (planet gh/aws:1:=5/r53))

Route 53 provides DNS.

parameter

(r53-endpoint)  endpoint?

(r53-endpoint v)  void?
  v : endpoint?
Set the endpoint for the service. Defaults to (endpoint "route53.amazonaws.com" #f).

procedure

(create-hosted-zone name unique [comment])  xexpr?

  name : string?
  unique : string?
  comment : string? = ""
Create a hosted zone and return an xexpr? respresenting the response XML.

procedure

(delete-hosted-zone zone-id)  xexpr?

  zone-id : string?
Delete a hosted zone and return an xexpr? respresenting the response XML.

Note that zone-id is not the domain name, it is the "zone ID".

procedure

(list-hosted-zones)  xexpr?

List all the hosted zones associated with the AWS account.

procedure

(get-hosted-zone zone-id)  xexpr?

  zone-id : string?
Given a zone-id, return information about the hosted zone.

procedure

(domain-name->zone-id name)  string?

  name : string?
Look up a zone ID from a domain name.

AWS requires the domain name to be in DNS style and end in a period, such as "foo.com.". However if name doesn’t end in a period, then domain-name->zone-id automatically appends one for you.

procedure

(list-resource-record-sets zone-id 
  #:max-items max-items 
  #:name name 
  #:type type 
  #:id id) 
  (listof xexpr?)
  zone-id : string?
  max-items : #f
  name : #f
  type : #f
  id : #f
Return a list of ResourceRecordSet xexpr?s.

procedure

(change-resource-record-sets zone-id    
  changes)  xexpr?
  zone-id : string?
  changes : xexpr?
Make changes to the record sets for the the zone.

It’s up to the caller to create an xexpr according to the AWS docs.

Example:

(change-resource-record-sets
 "/hostedzone/Z3K3IRK2M12WGD"
 `(ChangeResourceRecordSetsRequest
   ([xmlns "https://route53.amazonaws.com/doc/2012-02-29/"])
   (ChangeBatch
    (Comment "optional comment about the changes in this change batch request")
    (Changes (Change
              (Action "CREATE")
              (ResourceRecordSet (Name "foo2.com")
                                 (Type "A")
                                 (TTL "300")
                                 (ResourceRecords
                                  (ResourceRecord
                                   (Value "1.2.3.4")))))))))