
    K                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSK	Jr  \R                  " \R                  R                  \R                  R                  5       " S	 S
\R                   5      5       rg)z.Command to get IAM policy for an organization.    )absolute_import)division)unicode_literals)organizations)base)flags)	org_utilsc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	GetIamPolicy   zGet IAM policy for an organization.

Gets the IAM policy for an organization, given an organization ID.

If a domain is supplied instead of an organization ID, this command will
attempt to look up the organization ID associated with that domain.
EXAMPLESa@            The following command prints the IAM policy for an organization with
          the ID `123456789`:

            $ {command} 123456789

          The following command prints the IAM policy for the organzation
          associated with the domain ``example.com'':

            $ {command} example.com
          c                     [         R                  " S5      R                  U 5        [        R                  R                  U 5        g )Nzwhose policy you want to get.)r   IdArgAddToParserr   URI_FLAGRemoveFromParser)parsers    +lib/surface/organizations/get_iam_policy.pyArgsGetIamPolicy.Args4   s,    	KK/0<<VDMM""6*    c                     [         R                  " UR                  5      nU(       a$  [        R                  " 5       R                  U5      $ [         R                  " UR                  5      e)N)r	   GetOrganizationIdidr   Clientr   UnknownOrganizationError)selfargsorg_ids      r   RunGetIamPolicy.Run9   sH    ((1F!!#0088..tww77r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r    __static_attributes__r"   r   r   r   r      s1      
- + +8r   r   N)r'   
__future__r   r   r   +googlecloudsdk.api_lib.cloudresourcemanagerr   googlecloudsdk.callioper   (googlecloudsdk.command_lib.organizationsr   r	   ReleaseTracksReleaseTrackGABETAListCommandr   r"   r   r   <module>r4      sf     5 &  ' E ( : > D%%(($*;*;*@*@A!84## !8 B!8r   