
                         p   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	  \R                  " \R                  R                  5      \R                   " S S\R                  5      5       5       r\R                  " \R                  R                   \R                  R"                  5       " S	 S
\5      5       rg)zGet IAM Policy.    )absolute_import)division)unicode_literals)base)utilc                   :    \ rS rSrSrSS0rSr\S 5       rS r	Sr
g	)
GetIamPolicy     Get IAM policy for an IAP IAM resource.

*{command}* displays the IAM policy associated with an IAP IAM
resource. If formatted as JSON, the output can be edited and used as a policy
file for set-iam-policy. The output includes an "etag" field
identifying the version emitted and allowing detection of
concurrent policy updates; see
$ {parent_command} set-iam-policy for additional details.
EXAMPLESa>            To get the IAM policy for the web accesses to the IAP protected
          resources within the active project,
          run:

            $ {command}

          To get the IAM policy for the web accesses to the IAP protected
          resources within a project, run:

            $ {command} --project=PROJECT_ID

          To get the IAM policy for the web accesses to the IAP protected
          resources within an App Engine application, run:

            $ {command} --resource-type=app-engine

          To get the IAM policy for the web accesses to the IAP protected
          resources within an App Engine service, run:

            $ {command} --resource-type=app-engine --service=SERVICE_ID

          To get the IAM policy for the web accesses to the IAP protected
          resources within an App Engine service version, run:

            $ {command} --resource-type=app-engine --service=SERVICE_ID
                --version=VERSION

          To get the IAM policy for the web accesses to the IAP protected
          resources within all backend services, run:

            $ {command} --resource-type=backend-services

          To get the IAM policy for the web accesses to the IAP protected
          resources within a backend service, run:

            $ {command} --resource-type=backend-services --service=SERVICE_ID

          To get the IAM policy for the web accesses to the IAP protected
          resources within a regional backend service, run:

            $ {command} --resource-type=backend-services --service=SERVICE_ID
              --region=REGION

  Fc                     [         R                  " UU R                  S9  [        R                  R                  U5        g)zRegister flags for this command.

Args:
  parser: An argparse.ArgumentParser-like object. It is mocked out in order
      to capture some information, but behaves like an ArgumentParser.
)support_cloud_runN)iap_utilAddIapIamResourceArgs_support_cloud_runr   URI_FLAGRemoveFromParser)clsparsers     %lib/surface/iap/web/get_iam_policy.pyArgsGetIamPolicy.ArgsY   s2     ""00 	MM""6*    c                     [         R                  " U R                  5       UU R                  5      nUR	                  5       $ )zThis is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  The specified function with its description and configured filter.
)r   ParseIapIamResourceReleaseTrackr   r	   )selfargsiap_iam_refs      r   RunGetIamPolicy.Rung   s=     ..!K ##%%r    N)__name__
__module____qualname____firstlineno____doc__detailed_helpr   classmethodr   r    __static_attributes__r"   r   r   r	   r	      s8     ,/-b + +&r   r	   c                       \ rS rSrSrSrSrg)GetIamPolicyAlphax   r   Tr"   N)r#   r$   r%   r&   r'   r   r*   r"   r   r   r,   r,   x   s     r   r,   N)r'   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iapr   r   ReleaseTracksr   GADefaultUniverseOnlyListCommandr	   ALPHABETAr,   r"   r   r   <module>r7      s      &  ' ( ; D%%(()Y&4## Y&  *Y&x D%%++T->->-C-CD  Er   