
                             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  G d	 d
ej                        Zy)z;Command to get IAM policy for a resource and its ancestors.    )absolute_import)division)unicode_literals)base)policies_flags)flags)utilc                   &    e Zd ZdZed        Zd Zy)GetIamPolicya  Get IAM policies for a project and its ancestors.

  Get IAM policies for a project and its ancestors, given a project ID.

  ## EXAMPLES

  To get IAM policies for project `example-project-id-1` and its ancestors, run:

    $ {command} example-project-id-1
  c                     t        j                  d      j                  |        t        j                  j                  |        t        j                  |        y )Nzget IAM policy for)r   GetProjectResourceArgAddToParserr   URI_FLAGRemoveFromParserr   AddIncludeDenyFlag)parsers    0lib/surface/projects/get_ancestors_iam_policy.pyArgszGetIamPolicy.Args'   s<    	 45AA&IMM""6*%%f-    c                 t    t        j                  |j                  |j                  | j	                               S )N)command_lib_utilGetIamPolicyWithAncestors
project_idinclude_denyReleaseTrack)selfargss     r   RunzGetIamPolicy.Run-   s2    55doo6:6G6G6:6G6G6IK Kr   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r   r      s!    	 . .
Kr   r   N)r"   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iamr   #googlecloudsdk.command_lib.projectsr   r	   r   ListCommandr   r$   r   r   <module>r*      s4    B &  ' ( 9 5 HK4## Kr   