
    V	                         S 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                  \R                   " S S\R                  5      5       5       5       rg)	z(Command to SSH into a Cloud Run Service.    )ssh)base)
exceptions)flagsc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Ssh   zSSH into an instance.zZ          Starts a secure, interactive shell session with a Cloud Run instance.
          z          To start an interactive shell session with a Cloud Run service:

              $ {command} my-service --instance=my-instance-id
          )DESCRIPTIONEXAMPLESc                     [         R                  " U5        [         R                  " U5        UR                  SSS9  UR                  SSSS9  g )Nservicez$The name of the service to SSH into.)helpz--iap-tunnel-url-overrideTzFAllows for overriding the connection endpoint for integration testing.)hiddenr   )r   AddInstanceArgAddContainerArgadd_argument)clsparsers     lib/surface/run/services/ssh.pyArgsSsh.Args(   sY     
 	&!
3   #	      c                    [         R                  " U5      Ul        [         R                  " USS9Ul        UR                  (       d  [
        R                  " S5      eUR                  Ul        U R                  5       Ul
        [        R                  " U[        R                  R                  R                  5      R                  5         g)z2Connect to a running Cloud Run Service deployment.F)promptzQMissing required argument [region]. Set --region flag or set run/region property.N)r   GetProjectIDproject	GetRegionregionr   ArgumentErrorr   deployment_nameReleaseTrackrelease_trackrun_sshr   WorkloadTypeSERVICERun)selfargss     r   r&   Ssh.Run;   s    %%d+DL//$u5DK;;$$"   <<D**,DKKgkk..667;;=r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr   r&   __static_attributes__r*   r   r   r   r      s1     		-  $>r   r   N)r/   googlecloudsdk.api_lib.runr   r#   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   r   ReleaseTracksr!   ALPHAHiddenDefaultUniverseOnlyCommandr   r*   r   r   <module>r;      sf    / 5 ( 5 0 D%%++,,>$,, ,>   -,>r   