Created
March 17, 2015 06:37
-
-
Save murarisumit/56d73cec76d751407eb7 to your computer and use it in GitHub Desktop.
boto_Route53_get-all-Zone-ID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto import route53 | |
import os | |
r53=route53.connect_to_region(region_name='us-east-1') | |
all_zones = r53.get_all_hosted_zones() | |
hosted_zones = all_zones['ListHostedZonesResponse']['HostedZones'] | |
for hosted_zone in hosted_zones: | |
zone_id = hosted_zone['Id'] | |
print os.path.basename(zone_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment