FRTc @ s4 d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z d d l m Z m
Z
d d l m Z m
Z
d d l m Z d d l m Z m Z d d l m Z d e f d
YZ d e f d YZ d
e f d YZ d e f d YZ d e f d YZ d e f d YZ d S( iN( t sixt json( t OriginAccessIdentity( t Objectt StreamingObject( t ActiveTrustedSignerst TrustedSigners( t LoggingInfo( t S3Origint CustomOrigin( t ACLt DistributionConfigc
B sP e Z d d e d d d d d d d Z d Z d Z d Z d Z RS( t c
C s | | _ | | _ | | _ | r- | | _ n t t j | _ g | _ | r] | | _ n | | _ | | _ | | _
| | _ d S( s+
:param origin: Origin information to associate with the
distribution. If your distribution will use
an Amazon S3 origin, then this should be an
S3Origin object. If your distribution will use
a custom origin (non Amazon S3), then this
should be a CustomOrigin object.
:type origin: :class:`boto.cloudfront.origin.S3Origin` or
:class:`boto.cloudfront.origin.CustomOrigin`
:param enabled: Whether the distribution is enabled to accept
end user requests for content.
:type enabled: bool
:param caller_reference: A unique number that ensures the
request can't be replayed. If no
caller_reference is provided, boto
will generate a type 4 UUID for use
as the caller reference.
:type enabled: str
:param cnames: A CNAME alias you want to associate with this
distribution. You can have up to 10 CNAME aliases
per distribution.
:type enabled: array of str
:param comment: Any comments you want to include about the
distribution.
:type comment: str
:param trusted_signers: Specifies any AWS accounts you want to
permit to create signed URLs for private
content. If you want the distribution to
use signed URLs, this should contain a
TrustedSigners object; if you want the
distribution to use basic URLs, leave
this None.
:type trusted_signers: :class`boto.cloudfront.signers.TrustedSigners`
:param default_root_object: Designates a default root object.
Only include a DefaultRootObject value
if you are going to assign a default
root object for the distribution.
:type comment: str
:param logging: Controls whether access logs are written for the
distribution. If you want to turn on access logs,
this should contain a LoggingInfo object; otherwise
it should contain None.
:type logging: :class`boto.cloudfront.logging.LoggingInfo`
N( t
connectiont origint enabledt caller_referencet strt uuidt uuid4t cnamest commentt trusted_signerst loggingt default_root_object(
t selfR
R R R R R R R R ( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyt __init__# s 8 c C s d | j S( Ns DistributionConfig:%s( R ( R ( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyt __repr__j s c C s d } | d 7} | j r/ | | j j 7} n | d | j 7} x | j D] } | d | 7} qJ W| j r | d | j 7} n | d 7} | j r | d 7} n
| d 7} | d 7} | j r| d
7} x8 | j D]- } | d k r | d 7} q | d
| 7} q W| d 7} n | j rV| d 7} | d | j j 7} | d | j j 7} | d 7} n | j
ry| j
} | d | 7} n | d 7} | S( Ns'
sM
s( %s
s %s
s %s
s t truet falses
s
t Selfs
s* %s
s
s
s %s
s %s
s
s* %s
s
( R t to_xmlR R R R R R t buckett prefixR ( R t st cnamet signert dro( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyR m s>
c C s | d k r t | _ | j S| d k r> t | _ | j S| d k r] t | _ | j S| d k r| t | _ | j Sd Sd S( NR t LoggingR R ( R R R R R R R t None( R t namet attrsR
( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyt startElement s c C s | d k r | j j | n | d k r7 | | _ nv | d k rm | j d k ra t | _ q t | _ n@ | d k r | | _ n( | d k r | | _ n t | | | d S( Nt CNAMEt Commentt EnabledR t CallerReferencet DefaultRootObject(
R t appendR t lowert TrueR t FalseR R t setattr( R R( t valueR
( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyt
endElement s N( t __name__t
__module__R' R3 R R R R* R6 ( ( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyR ! s D # t StreamingDistributionConfigc B s2 e Z d d e d d d d d d Z d Z RS( R c C sG t t | j d | d | d | d | d | d | d | d | d S( NR
R R R R R R R ( t superR9 R ( R R
R R R R R R R ( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyR s c C sd d } | d 7} | j r/ | | j j 7} n | d | j 7} x | j D] } | d | 7} qJ W| j r | d | j 7} n | d 7} | j r | d 7} n
| d 7} | d 7} | j r| d
7} x8 | j D]- } | d k r | d 7} q | d
| 7} q W| d 7} n | j rV| d 7} | d | j j 7} | d | j j 7} | d 7} n | d 7} | S( Ns'
sV
s( %s
s %s
s %s
s R R s
s
R s
s* %s
s
s
s %s
s %s
s
s
(
R R R R R R R R R R! ( R R" R# R$ ( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyR s8
N( R7 R8 R' R3 R R ( ( ( sI /opt/freeware/lib/python2.7/site-packages/boto/cloudfront/distribution.pyR9 s t DistributionSummaryc
B sP e Z d d d d d d d d e d Z d Z d Z d Z d Z RS( R c
C s | | _ | | _ | | _ | | _ | | _ | | _ | | _ g | _ | ra | j j | n | | _ d | _ d | _ t
| _ d S( N( R
t domain_namet idt last_modified_timet statusR R R R0 R R' R t etagR3 t streaming(
R R
R<