get_all_hosted_zones doesn't show me rset.resource_records if the record type is an alias

27 views
Skip to first unread message

Michael B

unread,
Apr 23, 2014, 4:41:32 PM4/23/14
to boto-...@googlegroups.com
Here's the function I'm using for parsing through them:

def get_zones():
    zone_list = r53_conn.get_all_hosted_zones()
    for zone in zone_list['ListHostedZonesResponse']['HostedZones']:
        print "============================================================="
        print "Please select a hosted zone to modify (i.e. X17GS8S7DG8D): "
        print "============================================================="
        print zone['Name']
        print "\t%s" % zone['Id']
        zone_id = zone['Id'].replace('/hostedzone/', '')
        zones[zone['Name']] = zone_id
        sets = r53_conn.get_all_rrsets(zone_id)
        for rset in sets:
            print "\t%s: %s %s @ %s \n" % (rset.name, rset.type, rset.resource_records, rset.ttl)

This returns the following:

/hostedzone/X17GS8S7DG8D
mydomain.com.: NS [u'ns-1253.awsdns-28.org.', u'ns-452.awsdns-56.com.', u'ns-1907.awsdns-46.co.uk.', u'ns-632.awsdns-15.net.'] @ 172800 

mydomain.com.: SOA [u'ns-1253.awsdns-28.org. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400'] @ 900 

something.mydomain.com.: A [] @ 600 

If I change the A record to an IP address it shows up fine.

Any suggestions?
Reply all
Reply to author
Forward
0 new messages