
    !                        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)zACommand for starting 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)StartInstances   z2Start 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  [
        R                  R                  U 5        g )	Nzp
        table(project(),
              zone(),
              instanceName:label=INSTANCE,
              status)z--instances   )
min_lengthINSTANCETzNames of instances to start.)typemetavarrequiredhelp)display_info	AddFormatadd_argumentr   ArgListinstance_groups_flags%MULTISCOPE_INSTANCE_GROUP_MANAGER_ARGAddArgument)parsers    >lib/surface/compute/instance_groups/managed/start_instances.pyArgsStartInstances.Args%   sb    
!! # 
 (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[2        R4                  " US
U	UUUR6                  S9$ )N)default_scopescope_listerzcompute.instanceGroupManagers*instanceGroupManagersStartInstancesRequest)	instances)instanceGroupManagerr&   projectzonez#compute.regionInstanceGroupManagers0regionInstanceGroupManagersStartInstancesRequest)r(   r+   r)   regionzUnknown reference type {0}r   )
api_holdermethod_namerequest_templateinstances_holder_fieldigm_refr'   )r   ComputeApiHolderReleaseTrackclientr   r   compute_scope	ScopeEnumZONEr
   GetDefaultScopeListerResolveAsResource	resources
Collectionmessages1ComputeInstanceGroupManagersStartInstancesRequestName*InstanceGroupManagersStartInstancesRequestr)   r*   7ComputeRegionInstanceGroupManagersStartInstancesRequest0RegionInstanceGroupManagersStartInstancesRequestr,   
ValueErrorformatr   *SendInstancesRequestsAndPostProcessOutputsr'   )
selfargsholderr4   resource_argr$   r%   r1   r0   requests
             r   RunStartInstances.Run4   s   **4+<+<+>?F]]F(NNL!++00M..v6L,,#!	 - #G >>KQQ&||~5;__555C//|| R g 
			!F	FQWW&||~;A??;;b;I// X g 3::



  ! ! !KK$ 5.." "r"    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr    rJ   __static_attributes__rL   r"   r   r   r      s    
 ; ("r"   r   z8Start the stopped instances in a managed instance group.a  
        *{command}* starts one or more instances from a managed instance group,
thereby increasing the targetSize and reducing the targetStoppedSize 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 start 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)rQ   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   r	   "googlecloudsdk.command_lib.computer
   r   r5   2googlecloudsdk.command_lib.compute.instance_groupsr   UniverseCompatibleReleaseTracksr3   ALPHABETAGACommandr   detailed_helprL   r"   r   <module>rc      s    H &  ' 7 @ / ( 4 E ] T..33T5F5F5I5I:"T\\ :" :"| H	  r"   