Viewing File: /usr/lib/python2.7/site-packages/euca2ools/commands/iam/adduserpolicy.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_user( t
PutUserPolicy( t build_iam_policyt
AddUserPolicyc 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(! sp Add a new policy to a user. To add more complex policies than this tool supports, see euare-useruploadpolicy(1).t helps' user 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 -rs
--resourcet resourcessN resource(s) the policy should apply to
(at least one required)s -os --outputt
store_trues 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 UserNamet
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/adduserpolicy.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/adduserpolicy.pyt print_resultA 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/adduserpolicy.pyR # s"