File: //lib/python3/dist-packages/boto/route53/__pycache__/connection.cpython-310.pyc
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� de�ZdS )� )� exceptionN)�AWSAuthConnection)�handler)�ResourceRecordSets��Zone)�six�urlliba <?xml version="1.0" encoding="UTF-8"?>
<CreateHostedZoneRequest xmlns="%(xmlns)s">
<Name>%(name)s</Name>
<CallerReference>%(caller_ref)s</CallerReference>
<HostedZoneConfig>
<Comment>%(comment)s</Comment>
</HostedZoneConfig>
</CreateHostedZoneRequest>a` <?xml version="1.0" encoding="UTF-8"?>
<CreateHostedZoneRequest xmlns="%(xmlns)s">
<Name>%(name)s</Name>
<VPC>
<VPCId>%(vpc_id)s</VPCId>
<VPCRegion>%(vpc_region)s</VPCRegion>
</VPC>
<CallerReference>%(caller_ref)s</CallerReference>
<HostedZoneConfig>
<Comment>%(comment)s</Comment>
</HostedZoneConfig>
</CreateHostedZoneRequest>c s e Zd ZdZ dZ dZ dddddedddddf� fdd� Zd d
� Zd2� fdd
� Zd3dd�Z dd� Z
dd� Z d4dd�Zdd� Z
dZd5dd�Zd3dd�Zdd� Zd d!� Z d6d"d#�Zd$d%� Zd&d'� Z d7d(d)�Zd*d+� Zd,d-� Zd.d/� Zd0d1� Z� ZS )8�Route53Connectionzroute53.amazonaws.comz
2013-04-01z-https://route53.amazonaws.com/doc/2013-04-01/Nr Tc s, t t| �j|||d|||||| |
|d� d S )NT)�debug�security_token�validate_certs�https_connection_factory�profile_name)�superr
�__init__)�self�aws_access_key_id�aws_secret_access_key�port�proxy�
proxy_port�hostr r r
r r �� __class__� �9/usr/lib/python3/dist-packages/boto/route53/connection.pyr L s
�zRoute53Connection.__init__c C s dgS )N�route53r �r r r r �_required_auth_capabilityZ s z+Route53Connection._required_auth_capability� c sr |r+g }t �|�D ]\}}|d u rq |�|d tj�t|�� � q |dd�|� 7 }tt | �j
||||| jd�S )N�=�?�&)�
retry_handler)r � iteritems�appendr �parse�quote�str�joinr r
�make_request�_retry_handler) r �action�path�headers�data�params�pairs�key�valr 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
�marker�GET�/%s/hostedzone�r1 �, �HostedZones)�
HostedZone��list_marker�item_markerN�ListHostedZonesResponse�
NextMarker)r+ �Version�read�boto�logr �statusr �DNSServerError�reason�jsonresponse�Element�
XmlHandlerr'