%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/boto_cloudfront.pyo |
� ���^c @@ sk d Z d d l m Z m Z m Z d d l Z d d l Z e j e � Z d � Z d d d d d � Z d S( u Manage CloudFront distributions .. versionadded:: 2018.3.0 Create, update and destroy CloudFront distributions. This module accepts explicit AWS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More information available `here <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html>`_. If IAM roles are not used you need to specify them, either in a pillar file or in the minion's config file: .. code-block:: yaml cloudfront.keyid: GKTADJGHEIQSXMKKRBJ08H cloudfront.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs It's also possible to specify ``key``, ``keyid``, and ``region`` via a profile, either passed in as a dict, or a string to pull from pillars or minion config: .. code-block:: yaml myprofile: keyid: GKTADJGHEIQSXMKKRBJ08H key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs region: us-east-1 .. code-block:: yaml aws: region: us-east-1: profile: keyid: GKTADJGHEIQSXMKKRBJ08H key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs region: us-east-1 :depends: boto3 i ( t absolute_importt print_functiont unicode_literalsNc C@ s) d t k r% d } t | j d � f Sd S( u) Only load if boto is available. u boto_cloudfront.get_distributionu9 The boto_cloudfront state module could not be loaded: {}.u( boto_cloudfront exec module unavailable.u boto_cloudfront( t __salt__t Falset format( t msg( ( s? /usr/lib/python2.7/site-packages/salt/states/boto_cloudfront.pyt __virtual__7 s c C@ s i | d 6d d 6i d 6} t d | d | d | d | d | �} d | k rw t | d <d j | | d � | d <| S| d } | d! k rkt d r� d! | d <d j | � | d <i d! d 6| d 6| d <| St d | | | d | d | d | d | �} d | k r2t | d <d j | | d � | d <| St | d <d j | � | d <i d! d 6| d 6| d <| Si | d d d 6| d d 6} i | d 6| d 6} t d | | � } d � } d j t j | | � j t � | | � j t � � � } t d | k pd | k � } | s9t | d <d j | � | d <| St d r�d! | d <d j d j | � | g � | d <i | d 6| d <| St d | | | d | d | d | d | �} d | k r�t | d <d j | | d � | d <| St | d <d j | � | d <i | d 6| d <| Sd! S("