Current File : //lib/python2.7/site-packages/euca2ools/commands/iam/createinstanceprofile.pyc
�
��Xc@slddlmZmZmZddlmZddlmZddlm	Z	m
Z
defd��YZdS(i����(t
IAMRequestt
AS_ACCOUNTtarg_iprofile(tAddRoleToInstanceProfile(t
CreateRole(tArgtMutuallyExclusiveArgListtCreateInstanceProfilecBs�eZdZedd�edddddd�eedd	dd
dddd�ed
dddddddd��edddddddd�egZd�Z	d�Z
RS(sCreate a new instance profilethelps+name of the new instance profile (required)s-ps--pathtdesttPaths0path for the new instance profile (default: "/")s-rs
--add-roletroletroute_tos+also add a role to the new instance profiles
--create-roletcreate_roletactiont
store_truesealso create a role with the
                    same name and path and add it to the instance profiles-vs	--verboses-print the new instance profile's ARN and GUIDcCsd}|jjd�rq|jd}tj|d|d|jjd�ddd|jjd��}|j�n"|jjd	�r�|jd	}n|r�|jjd
|jd	|jd�tj|d|d|jdd|jjd��}|j�ndS(NR
tInstanceProfileNametRoleNameR
tpathtservice_sec2.amazonaws.comtDelegateAccountRs%adding role %s to instance profile %s(	tNonetargstgetRt
from_othertmaintlogtinfoR(tselft_t	role_nametreq((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createinstanceprofile.pytpostprocess1s$


cCsM|jjd�rI|jdi�jd�GH|jdi�jd�GHndS(NtverbosetInstanceProfiletArntInstanceProfileId(RR(Rtresult((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createinstanceprofile.pytprint_resultFsN(t__name__t
__module__tDESCRIPTIONRRRRRtARGSR R&(((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createinstanceprofile.pyR"s			N(teuca2ools.commands.iamRRRt/euca2ools.commands.iam.addroletoinstanceprofileRt!euca2ools.commands.iam.createroleRtrequestbuilderRRR(((sP/usr/lib/python2.7/site-packages/euca2ools/commands/iam/createinstanceprofile.pyt<module>s