o
ckF[;[ @ s d dl mZ d dlZd dlZd dlZd dlZd dlmZ d dlm Z d dl
Zd dlmZ d dl
mZ d dlmZmZ dZd ZG d
d deZdS ) ) exceptionN)AWSAuthConnection)handler)ResourceRecordSetsZone)sixurlliba
%(name)s
%(caller_ref)s
%(comment)s
a`
%(name)s
%(vpc_id)s
%(vpc_region)s
%(caller_ref)s
%(comment)s
c s e Zd ZdZ dZ dZ dddddedddddf fdd Zd d
Zd2 fdd
Zd3ddZ dd Z
dd Z d4ddZdd Z
dZd5ddZd3ddZdd Zd d! Z d6d"d#Zd$d% Zd&d' Z d7d(d)Zd*d+ Zd,d- Zd.d/ Zd0d1 Z ZS )8Route53Connectionzroute53.amazonaws.comz
2013-04-01z-https://route53.amazonaws.com/doc/2013-04-01/Nr Tc s, t t| j|||d|||||| |
|d d S )NT)debugsecurity_tokenvalidate_certshttps_connection_factoryprofile_name)superr
__init__)selfaws_access_key_idaws_secret_access_keyportproxy
proxy_porthostr r r
r r __class__ 9/usr/lib/python3/dist-packages/boto/route53/connection.pyr L s
zRoute53Connection.__init__c C s dgS )Nroute53r r r r r _required_auth_capabilityZ s z+Route53Connection._required_auth_capability c sr |r+g }t |D ]\}}|d u rq ||d tjt| q |dd| 7 }tt | j
||||| jdS )N=?&)
retry_handler)r iteritemsappendr parsequotestrjoinr r
make_request_retry_handler) r actionpathheadersdataparamspairskeyvalr r r r+ ] s
zRoute53Connection.make_requestc C s i }|rd|i}| j dd| j |d}| }tj| |jdkr+t|j|j |tj
jddd}tj
|d }|
| |rJ|d
d | d|d
v rh|d
d }|d
d }| ||}d|d
v sP|S )aA
Returns a Python data structure with information about all
Hosted Zones defined for the AWS account.
:param int start_marker: start marker to pass when fetching additional
results after a truncated list
:param list zone_list: a HostedZones list to prepend to results
markerGET/%s/hostedzoner1 , HostedZones)
HostedZonelist_markeritem_markerNListHostedZonesResponse
NextMarker)r+ Versionreadbotologr statusr DNSServerErrorreasonjsonresponseElement
XmlHandlerr' extendget_all_hosted_zones) r start_marker zone_listr1 responsebodyehnext_markerr r r rL k s4
z&Route53Connection.get_all_hosted_zonesc C sv d| j |f }| d|}| }tj| |jdkr%t|j|j |tj
jddd}tj
|d}|
| |S )z
Get detailed information about a particular Hosted Zone.
:type hosted_zone_id: str
:param hosted_zone_id: The unique identifier for the Hosted Zone
/%s/hostedzone/%sr6 r9 NameServers
NameServerr<