
    a                        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
KJr  SS	KJr  \
R"                  \
R$                  " \
R&                  R(                  \
R&                  R*                  \
R&                  R,                  5       " S S\
R.                  5      5       5       rSSSS.\l        g)zCCommand for suspending instances owned by a managed instance group.    )absolute_import)division)unicode_literals)base_classes)instance_groups_utils)arg_parsers)base)flags)scopec                   .    \ rS rSrSr\S 5       rS rSrg)SuspendInstances   4Suspend instances owned by a managed instance group.c                     U R                   R                  S5        U R                  S[        R                  " SS9SSSS9  U R                  S	S
SSS9  [
        R                  R                  U 5        g )Nzp
        table(project(),
              zone(),
              instanceName:label=INSTANCE,
              status)z--instances   )
min_lengthINSTANCETzNames of instances to suspend.)typemetavarrequiredhelpz--forceF
store_truez
          Immediately suspend the specified instances, skipping the initial
          delay, if one is specified in the standby policy.)defaultactionr   )display_info	AddFormatadd_argumentr   ArgListinstance_groups_flags%MULTISCOPE_INSTANCE_GROUP_MANAGER_ARGAddArgument)parsers    @lib/surface/compute/instance_groups/managed/suspend_instances.pyArgsSuspendInstances.Args%   s    
!! # 
 (00A> *!%=	  ?
 ?	  @ ??KK    c           	      "   [         R                  " U R                  5       5      nUR                  n[        R
                  n[        R                  R                  n[        R                  " U5      nUR                  UUR                  UUS9nUR                  5       S:X  aX  SnUR                  R                  UR!                  5       UR                  R#                  / S9UR$                  UR&                  S9n	OUR                  5       S:X  aX  SnUR                  R)                  UR!                  5       UR                  R+                  / S9UR$                  UR,                  S9n	O([/        S	R1                  UR                  5       5      5      eUR3                  S
5      (       aK  UR                  5       S:X  a  UR4                  U	R6                  l        OUR4                  U	R:                  l        [<        R>                  " USU	UUUR@                  S9$ )N)default_scopescope_listerzcompute.instanceGroupManagers,instanceGroupManagersSuspendInstancesRequest)	instances)instanceGroupManagerr*   projectzonez#compute.regionInstanceGroupManagers2regionInstanceGroupManagersSuspendInstancesRequest)r,   r/   r-   regionzUnknown reference type {0}forcer   )
api_holdermethod_namerequest_templateinstances_holder_fieldigm_refr+   )!r   ComputeApiHolderReleaseTrackclientr   r    compute_scope	ScopeEnumZONEr
   GetDefaultScopeListerResolveAsResource	resources
Collectionmessages3ComputeInstanceGroupManagersSuspendInstancesRequestName,InstanceGroupManagersSuspendInstancesRequestr-   r.   9ComputeRegionInstanceGroupManagersSuspendInstancesRequest2RegionInstanceGroupManagersSuspendInstancesRequestr0   
ValueErrorformatIsSpecifiedr1   r*   forceSuspendr/   r   *SendInstancesRequestsAndPostProcessOutputsr+   )
selfargsholderr9   resource_argr(   r)   r6   r5   requests
             r#   RunSuspendInstances.Run;   s   **4+<+<+>?F]]F(NNL!++00M..v6L,,#!	 - #G >>MSS&||~7=77"7E//|| T g 
			!F	FSYY&||~=C__===K// Z g 3::



  ! !   				!@	@LPJJ<<IRVR\R\BBO KK& 5.." "r&    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr$   rQ   __static_attributes__rS   r&   r#   r   r      s    
 = *."r&   r   r   a  
        *{command}* suspends one or more instances from a managed instance
group, thereby reducing the targetSize and increasing the targetSuspendedSize
of the group.

The command returns the operation status per instance, which might be ``FAIL'',
``SUCCESS'', or ``MEMBER_NOT_FOUND''. ``MEMBER_NOT_FOUND'' is returned only for
regional groups when the gcloud command-line tool wasn't able to resolve the
zone from the instance name.
z      To suspend an instance from a managed instance group in the us-central1-a
      zone, run:

              $ {command} example-managed-instance-group --zone=us-central1-a \
              --instances=example-instance
    )briefDESCRIPTIONEXAMPLESN)rX   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   r	   "googlecloudsdk.command_lib.computer
   r   r:   2googlecloudsdk.command_lib.compute.instance_groupsr   UniverseCompatibleReleaseTracksr8   ALPHABETAGACommandr   detailed_helprS   r&   r#   <module>rj      s    J &  ' 7 @ / ( 4 E ] T..33T5F5F5I5IG"t|| G" G"V D	"  r&   