
                             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  SSK	J
r  SSKJ
r  SSKJ
r
   " S S	\R                  5      rg
)z1Command for adding health checks to target pools.    )absolute_import)division)unicode_literals)base_classes)base)flagsc                   6    \ rS rSrSrSrSr\S 5       rS r	Sr
g)AddHealthChecks   a  Add a legacy HTTP health check to a target pool.

*{command}* is used to add a legacy HTTP health check
to a target pool. Legacy health checks are used to determine
the health status of instances in the target pool. Only one
health check can be attached to a target pool, so this command
will fail if there as already a health check attached to the target
pool. For more information on health checks and load balancing, see
[](https://cloud.google.com/compute/docs/load-balancing-and-autoscaling/)
Nc                     [         R                  " S5      U l        U R                  R                  U5        [        R
                  " SS9U l        U R                  R                  USS9  g )Nzadd toz" to which to add the health check.)help_suffixzadd health checks to)operation_type)http_health_check_flags$HttpHealthCheckArgumentForTargetPoolHEALTH_CHECK_ARGAddArgumentr   TargetPoolArgumentTARGET_POOL_ARG)clsparsers     5lib/surface/compute/target_pools/add_health_checks.pyArgsAddHealthChecks.Args-   sc     	 DDXN $$V,228:C##5 $ 7    c                 f   [         R                  " U R                  5       5      nUR                  nU R                  R                  XR                  5      nU R                  R                  UUR                  [        R                  " U5      S9nUR                  R                  UR                  UR                  UR                  5       UR                  R                  UR                  R!                  UR#                  5       S9/S9S9nUR%                  UR&                  R(                  SU4/5      $ )N)scope_lister)healthCheck)healthChecks)regionproject
targetPool targetPoolsAddHealthCheckRequestAddHealthCheck)r   ComputeApiHolderReleaseTrackclientr   ResolveAsResource	resourcesr   compute_flagsGetDefaultScopeListermessages'ComputeTargetPoolsAddHealthCheckRequestr   r    Name TargetPoolsAddHealthCheckRequestHealthCheckReferenceSelfLinkMakeRequestsapitools_clienttargetPools)selfargsholderr&   health_check_reftarget_pool_refrequests          r   RunAddHealthChecks.Run7   s)   **4+<+<+>?F]]F,,>>  **<<"88@ = BO
 ooEE%%''"'')OO<<$ooBB 0 9 9 ; C = > = ? F AG !7!7!C!C!17!<  = > >r    )__name__
__module____qualname____firstlineno____doc__r   r   classmethodr   r:   __static_attributes__r<   r   r   r
   r
      s+    	 /7 7>r   r
   N)rA   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r)   5googlecloudsdk.command_lib.compute.http_health_checksr   /googlecloudsdk.command_lib.compute.target_poolsSilentCommandr
   r<   r   r   <module>rK      s6     8 &  ' 7 ( E& A/>d(( />r   