
                            S r SSKJr  SSKJr  SSKJr  SSK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S.r\R$                  \R&                  " \R(                  R*                  \R(                  R,                  \R(                  R.                  5       " S S\R0                  5      5       5       r\\l        g)z9The Secure Source Manager create instance command module.    )absolute_import)division)unicode_literalsN)	instances)
exceptions)base)flags)resource_args)logz<
          Create a Secure Source Manager instance.
        a  
            To create a Secure Source Manager instance named 'my-instance' in location 'us-central1' asynchronously, run:

            $ {command} my-instance --region=us-central1

            To create a Secure Source Manager instance named 'my-instance' in location 'us-central1' synchronously, and wait a maximum of 30 minutes for it to finish being created, run:

            $ {command} my-instance --region=us-central1 --no-async --max-wait=30m
        )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Create0   z(Create a Secure Source Manager instance.c                 b   [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        [        R
                  " U 5        [        R                  " U S5        [        R                  R                  U 5        [        R                  R                  U S5        g )Nz	to create60mT)r
   AddInstanceResourceArgr	   	AddKmsKeyAddPrivateConfigGroup$AddEnableWorkforceIdentityFederation
AddMaxWaitr   
ASYNC_FLAGAddToParser
SetDefault)parsers    .lib/surface/source_manager/instances/create.pyArgsCreate.Args7   sp    ((=	OOF	'	..v6	VU#OO'OOvt,    c           	      L   UR                   n[        R                  " UR                  S9nUR                  nUR
                  nUR                  nUR                  n/ nUR                  S5      (       a  UR                  n[        R                  " 5       n	UR                  R                  R                  5       n
 U	R                  U
UUUUUS9n[$        R(                  R+                  SR-                  U
R.                  5      5        U(       a  UR                  S5      (       d  SUl        U$ U	R1                  U	R3                  U5      SR-                  U	R3                  U5      R5                  5       5      US	9$ ! [         R"                   a    [$        R&                  " S5        e f = f)
N)secondspsc_allowed_projects)instance_refkms_key
is_privateca_pool$enable_workforce_identity_federationr"   zSecure Source Manager API (securesourcemanager.googleapis.com) has not been enabled on the project. Secure Source Manager is generally available (GA) by invitation only. To use Secure Source Manager, contact your Google Account team.zCreate request issued for [{}].formatdefaultz&Waiting for operation [{}] to complete)operation_refmessagemax_wait)async_datetime	timedeltar,   r$   r%   r&   r'   IsSpecifiedr"   r   InstancesClientCONCEPTSinstanceParser   r   EnableServiceExceptionr   warningstatusPrintr(   instancesIdWaitForOperationGetOperationRefRelativeName)selfargsis_asyncr,   r$   r%   r&   r'   r"   clientr3   	operations               r   Run
Create.RunB   s   {{H!!$--8HllGJllG11 ) .//!66 &&(F}}%%++-H--/S3   i& JJ6fX1124  h'' "",,Y78	""9-::<
> #  / ,, 	 
kk/ 	s   9E7 7,F# N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   rB   __static_attributes__rD   r   r   r   r   0   s    
 1- -6r   r   )rI   
__future__r   r   r   r.   *googlecloudsdk.api_lib.securesourcemanagerr   googlecloudsdk.api_lib.servicesr   googlecloudsdk.callioper   )googlecloudsdk.command_lib.source_managerr	   r
   googlecloudsdk.corer   DETAILED_HELPDefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGACreateCommandr   detailed_helprD   r   r   <module>r[      s    @ &  '  @ 6 ( ; C #		$ T..33T5F5F5I5IDT D DN % r   