
    n                         S r SSKJr  SSKJr  SSKJr  SSSS.rS	 r	S
 r
\R                  " \R                  R                  5      \R                   " S S\R                  5      5       5       rg)z&Create instant snapshot group command.    )base_classes)base)flagsz!Create an instant snapshot group.z    *{command}* creates an instant snapshot group of the consistency group.  An Instant Snapshot Group is a Point In Time view of the constituent disks of a Consistency Group, they are stored in-place as Instant Snapshots on the corresponding disks.
    a-      To create an instant snapshot group 'my-instant-snapshot-group' in zone 'us-east1-a' from a consistency group 'my-consistency-group' in region 'us-east1', run:
        $ {command} my-instant-snapshot-group --zone us-east1-a --source-consistency-group=regions/us-east1/resourcePolicies/policy1
    )briefDESCRIPTIONEXAMPLESc                 0    [         R                  " U 5        g N)	isg_flagsAddSourceConsistencyGroupArgparsers    5lib/surface/compute/instant_snapshot_groups/create.py_SourceArgsr   "   s    ((0    c                     [         R                  " 5       [        l        [        R                  R	                  U SS9  [        U 5        g)z?A helper function to build args based on different API version.create)operation_typeN)r   MakeInstantSnapshotGroupArgCreateISG_ARGAddArgumentr   r   s    r   _CommonArgsr   &   s1    88:&...VH=fr   c                   H    \ rS rSrSr\S 5       r\S	S j5       rS rS r	Sr
g)
r   -   z/Create a Compute Engine instant snapshot group.c                     [        U5        g r
   )r   )clsr   s     r   ArgsCreate.Args2   s
    r   c                 J    [         R                  " U R                  5       5      $ r
   )r   ComputeApiHolderReleaseTrack)r   no_https     r   _GetApiHolderCreate._GetApiHolder6   s    (()9)9);<<r   c                    U R                  5       nUR                  nUR                  n[        R                  R                  XR                  5      n/ n[        USS 5      nUR                  5       S:X  a]  UR                  UR                  5       US9nUR                  UUR                  UR                  S9n	UR                  R                  SU	4n	OpUR                  5       S:X  a\  UR                  UR                  5       US9nUR!                  UUR                  UR"                  S9n	UR                  R$                  SU	4n	UR'                  W	5        UR)                  U5      $ )Nsource_consistency_groupzcompute.instantSnapshotGroups)namesourceConsistencyGroup)instantSnapshotGroupprojectzoneInsertz#compute.regionInstantSnapshotGroups)r*   r+   region)r$   clientmessagesr   r   ResolveAsResource	resourcesgetattr
CollectionInstantSnapshotGroupName)ComputeInstantSnapshotGroupsInsertRequestr+   r,   apitools_clientinstantSnapshotGroups/ComputeRegionInstantSnapshotGroupsInsertRequestr.   regionInstantSnapshotGroupsappendMakeRequests)
selfargscompute_holderr/   r0   isg_refrequestssource_cg_urlinstant_snapshot_grouprequests
             r   _RunCreate._Run:   sg   '')N""FHnn..t5M5MNGHD"<dCM>>'<<||~m  =   BB5//|| C g 
 
 
6
6

g
 
			!F	F'<<||~m  =   HH5// I g 
 
 
<
<

g OOGx((r   c                 $    U R                  U5      $ r
   )rF   )r>   r?   s     r   Run
Create.Runb   s    99T?r    N)F)__name__
__module____qualname____firstlineno____doc__classmethodr   r$   rF   rI   __static_attributes__rK   r   r   r   r   -   s8     8  = =&)Pr   r   N)rP   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   :googlecloudsdk.command_lib.compute.instant_snapshot_groupsr   r   DETAILED_HELPr   r   ReleaseTracksr"   ALPHADefaultUniverseOnlyCommandr   rK   r   r   <module>r[      sy    - 8 ( Y 1	1 D%%++,4T\\ 4  -4r   