Viewing File: /usr/lib/python2.7/site-packages/euca2ools/commands/iam/addrolepolicy.pyo
ó
¡ôXc @ sr d d l Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m
Z
d e f d „ ƒ YZ d S( iÿÿÿÿN( t Arg( t
IAMRequestt
AS_ACCOUNTt arg_role( t
PutRolePolicy( t build_iam_policyt
AddRolePolicyc B sÑ e Z d Z e d d ƒ e d d d d d e d d ƒe d d
d d d e d d ƒe d d d d d d d e d d ƒe d d d d d d d e d d ƒe d d d d d d ƒe g Z d „ Z d „ Z RS(! sq Add a new policy to a role. To add more complex policies than this tool supports, see euare-roleuploadpolicy(1).t helps' role to attach the policy to (required)s -ps
--policy-namet metavart POLICYt requireds! name of the new policy (required)s -es --effectt choicest Allowt Denys6 whether the new policy should Allow or Deny (required)s -as --actiont destt actionst actiont appendsL action(s) the policy should apply to
(at least one required)s -cs
--resourcet resourcessN resource(s) the policy should apply to
(at least one required)s -os --outputt
store_trues% also display the newly-created policyc C sŒ t | j d | j d | j d ƒ } t j | ƒ } t j | d | j d d | j d d | d | j d ƒ} | j ƒ } | | d <| S( Nt effectR R t RoleNamet
PolicyNamet policy_namet PolicyDocumentt DelegateAccount( R t argst jsont dumpsR t
from_othert paramst main( t selft policyt
policy_doct reqt response( ( sH /usr/lib/python2.7/site-packages/euca2ools/commands/iam/addrolepolicy.pyR 5 s
c C s | j d r | d GHn d S( Nt outputR ( R ( R t result( ( sH /usr/lib/python2.7/site-packages/euca2ools/commands/iam/addrolepolicy.pyt print_resultB s
( R R
(
t __name__t
__module__t DESCRIPTIONR R t TrueR t ARGSR R' ( ( ( sH /usr/lib/python2.7/site-packages/euca2ools/commands/iam/addrolepolicy.pyR # s"