
    K                        d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddl	mZ  ej                  ej                  j                  ej                  j                         G d	 d
ej                                Zy)z.Command to get IAM policy for an organization.    )absolute_import)division)unicode_literals)organizations)base)flags)	org_utilsc                   .    e Zd ZdZddiZed        Zd Zy)GetIamPolicyzGet 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                     t        j                  d      j                  |        t        j                  j                  |        y )Nzwhose policy you want to get.)r   IdArgAddToParserr   URI_FLAGRemoveFromParser)parsers    +lib/surface/organizations/get_iam_policy.pyArgszGetIamPolicy.Args4   s,    	KK/0<<VDMM""6*    c                     t        j                  |j                        }|r#t        j                         j                  |      S t        j                  |j                        )N)r	   GetOrganizationIdidr   Clientr   UnknownOrganizationError)selfargsorg_ids      r   RunzGetIamPolicy.Run9   sH    ((1F!!#0088..tww77r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   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>r/      sh     5 &  ' E ( : > D%%(($*;*;*@*@A!84## !8 B!8r   