
    
                     2   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                  \R                  R                  \R                  R                  5      \R                   " S S\R                   5      5       5       rg	)
zEnable Identity-Aware Proxy.    )absolute_import)division)unicode_literals)base)utilc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Enable   zEnable Cloud Identity-Aware Proxy (Cloud IAP) on an IAP resource.

This command enables Cloud Identity-Aware Proxy on an IAP resource. OAuth 2.0
credentials must be set, or must have been previously set, to enable IAP.
EXAMPLESa            To enable IAP on an App Engine application, run:

            $ {command} --resource-type=app-engine
                --oauth2-client-id=CLIENT_ID --oauth2-client-secret=SECRET

          To enable IAP on a global backend service, run:

            $ {command} --resource-type=backend-services
                --oauth2-client-id=CLIENT_ID --oauth2-client-secret=SECRET
                --service=SERVICE_ID

          To enable IAP on a region backend service, run:

            $ {command} --resource-type=backend-services
                --oauth2-client-id=CLIENT_ID --oauth2-client-secret=SECRET
                --service=SERVICE_ID --region=REGION
  c                     [         R                  " U5        [         R                  " U5        [        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.
N)iap_utilAddIapResourceArgsAddOauthClientArgsr   URI_FLAGRemoveFromParser)clsparsers     lib/surface/iap/web/enable.pyArgsEnable.Args:   s2     ''MM""6*    c                     [         R                  " U R                  5       U5      nUR                  UR                  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   ParseIapResourceReleaseTrackr	   oauth2_client_idoauth2_client_secret)selfargsiap_refs      r   Run
Enable.RunF   s<     ''(9(9(;TBG>>$//1J1JKKr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr   r    __static_attributes__r"   r   r   r	   r	      s2    
 -, 	+ 	+Lr   r	   N)r'   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iapr   r   ReleaseTracksr   ALPHABETAGADefaultUniverseOnlyCommandr	   r"   r   r   <module>r4      s     # &  ' ( ; !2!2!7!79J9J9M9M 3LT\\ 3L 3Lr   