
    _                     ,   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	d
Zej                   ej                  ej                   j"                  ej                   j$                         G d dej&                                      Zee_        y)z6Create command for Colab Enterprise Runtime Templates.    )
operations)runtime_templates)util)base)endpoint_util)flagszh
        Create a Colab Enterprise runtime template, a VM configuration for your notebook runtimes.
    a  
        To create a runtime template in region 'us-central1' with the display name 'my-runtime-template', run:

        $ {command} --region=us-central1 --display-name=my-runtime-template

        To create a runtime template for a VM with machine type n1-standard-2 and one NVIDIA_TESLA_V100 accelerator, run:

        $ {command} --machine-type=n1-standard-2 --accelerator-type=NVIDIA_TESLA_V100 --accelerator-count=1 --region=us-central1 --display-name=my-runtime-template

        To create a runtime template that disables end user credential access, run:

        $ {command} --no-enable-euc --region=us-central1 --display-name=my-runtime-template
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)CreatezCreate a runtime template.c                 .    t        j                  |        y)z Register flags for this command.N)r   AddCreateRuntimeTemplateFlags)parsers    -lib/surface/colab/runtime_templates/create.pyArgszCreate.Args3   s     
''/    c           
      |   | j                         }t        j                  | j                               }|j                  j                  j                         }|j                         d   }t        j                  d|      5  t        j                  |      }|j                  }|j                  t        j                  ||            }t        j                  t        j                   |      |t        j"                  |j$                        t        j&                  |      ddd      cd	d	d	       S # 1 sw Y   y	xY w)
z9This is what gets called when the user runs this command.locationsIdBETA)versionregion)clientzruntime templatecreatez-Waiting for runtime template to be created...)operations_clientopop_refasynchronouskind
log_methodmessageN)ReleaseTrackr   GetMessagesCONCEPTSr   ParseAsDictr   AiplatformEndpointOverrides	GetClient+projects_locations_notebookRuntimeTemplatesr   runtime_templates_util"CreateRuntimeTemplateCreateRequestWaitForOpMayber   OperationsClientParseRuntimeTemplateOperationnameGetAsyncConfig)	selfargsrelease_trackmessages
region_refr   
api_clientruntime_templates_service	operations	            r   Runz
Create.Run8   s	   %%'M 1 1 34H%%++-J /F		2	2v
 >>-0j

@
@   ,22
 
C
CHi
   &77zJ'EEnn **40!A

 
 
s   B&D22D;N)__name__
__module____qualname____doc__staticmethodr   r8    r   r   r   r   .   s     #0 0r   r   N)r<   googlecloudsdk.api_lib.air   'googlecloudsdk.api_lib.colab_enterpriser   r)   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   +googlecloudsdk.command_lib.colab_enterpriser   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr!   GAr   CreateCommandr   detailed_helpr>   r   r   <module>rJ      s     = 0 _ 8 ( 7 =	( D%%(($*;*;*@*@A%T % B %P & r   