
                            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	S
.r\	R                  \	R                   " \	R"                  R$                  5       " S S\	R&                  5      5       5       r\\l        g)z(Create command for Workbench Executions.    )
operations)util)
executions)base)endpoint_util)flagsz4
        Create a Workbench notebook execution.
    a  
        To create an execution of a notebook file with Cloud Storage URI `gs://my-bucket/my-notebook.ipynb`, with an execution job display name `my-execution`, running with service account `my-service-account@my-project.iam.gserviceaccount.com`, with results uploaded to Cloud Storage bucket `gs://my-bucket/results`, and in region `us-central1`, with a compute configuration of `n1-standard-4` machine type:

         $ {command} --display-name=my-execution --gcs-notebook-uri=gs://my-bucket/my-notebook.ipynb --service-account=my-service-account@my-project.iam.gserviceaccount.com --gcs-output-uri=gs://my-bucket/results --region=us-central1 --machine-type=n1-standard-4
    )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Create&   zCreate a Workbench execution.c                 .    [         R                  " U SS9  g)z Register flags for this command.Tfor_workbenchN)r   AddCreateExecutionFlags)parsers    *lib/surface/workbench/executions/create.pyArgsCreate.Args+   s     
!!&=    c                    U R                  5       n[        R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  5       S   n[        R                  " SUS9   [        R                  " U5      nUR                  nUR                  [        R                  " XSS95      n[        R                  " [        R                   " US9U[        R"                  " UR$                  5      [        R&                  " U5      SSS	S
9sSSS5        $ ! , (       d  f       g= f)z9This is what gets called when the user runs this command.locationsIdBETA)versionregionTr   )clientznotebook executioncreatez&Waiting for execution to be created...)operations_clientopop_refasynchronouskind
log_methodmessageN)ReleaseTrackr   GetMessagesCONCEPTSr   ParseAsDictr   AiplatformEndpointOverrides	GetClient(projects_locations_notebookExecutionJobsr   executions_utilCreateExecutionCreateRequestWaitForOpMayber   OperationsClientParseExecutionOperationnameGetAsyncConfig)	selfargsrelease_trackmessages
region_refr   
api_clientexecutions_service	operations	            r   Run
Create.Run0   s	   %%'M 1 1 34H%%++-J /F		2	2v
 >>-0j

=
=  %++

6
6Di
   &77zJ 88nn **40#:

 
 
s   B$D//
D= N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r<   __static_attributes__r>   r   r   r   r   &   s     &> >r   r   N)rC   googlecloudsdk.api_lib.air   'googlecloudsdk.api_lib.colab_enterpriser   (googlecloudsdk.api_lib.notebook_executorr   r-   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   ,googlecloudsdk.command_lib.notebook_executorr   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr%   r   CreateCommandr   detailed_helpr>   r   r   <module>rQ      s~     / 0 8 R ( 7 >		 D%%**+$T $ , $N & r   