
                         v   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lmZ d	d
dZe
j                   e
j                  e
j                   j"                         G d de
j$                                      Z e
j                  e
j                   j(                         G d de             Zee_        y)z%'workbench instances create' command.    )absolute_import)division)unicode_literals)	instances)util)base)flagsz+
        Creates a workbench instance.
    a  
    To create an instance from a VmImage family, run:

      $ {command} example-instance --vm-image-project=cloud-notebooks-managed --vm-image-family=workbench-instances --machine-type=n1-standard-4 --location=us-central1-b

    To create an instance from a VmImage name, run:

      $ {command} example-instance --vm-image-project=cloud-notebooks-managed --vm-image-name=workbench-instances-v20230925-debian-11-py310 --machine-type=n1-standard-4 --location=us-central1-b

    To create an instance from a Container Repository, run:

      $ {command} example-instance --container-repository=gcr.io/deeplearning-platform-release/base-cpu --container-tag=latest --machine-type=n1-standard-4 --location=us-central1-b

    To create an instance with shielded-secure-boot, shielded-vtpm and shielded-integrity-monitoring disabled, run:

      $ {command} example-instance --shielded-integrity-monitoring=false --shielded-secure-boot=false --shielded-vtpm=false --location=us-central1-b
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZdZed        Zd Zy)CreateCreates a workbench instance.Fc                 D    t        j                  | j                  |       y)z Register flags for this command.N)r	   AddCreateInstanceFlags_support_managed_euc)clsparsers     )lib/surface/workbench/instances/create.pyArgszCreate.Args;   s     
  !9!96B    c                 R   | j                         }t        j                  |      }t        j                  |      }|j                  }|j                  t        j                  ||| j                              }t        j                  ||||t        j                  j                        S )z9This is what gets called when the user runs this command.)operation_type)ReleaseTrackr   	GetClientGetMessagesprojects_locations_instancesr   instance_utilCreateInstanceCreateRequestr   	HandleLROOperationTypeCREATE)selfargsrelease_trackclientmessagesinstance_service	operations          r   Runz
Create.Run@   s    %%'M^^M*F.H:: ''11(D55	
I
 ""$2299 r   N)__name__
__module____qualname____doc__r   classmethodr   r)    r   r   r   r   4   s&     &C Cr   r   c                       e Zd ZdZdZy)
CreateBetar   TN)r*   r+   r,   r-   r   r/   r   r   r1   r1   T   s    %r   r1   N)r-   
__future__r   r   r    googlecloudsdk.api_lib.workbenchr   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.workbenchr	   DETAILED_HELPDefaultUniverseOnlyReleaseTracksr   GACreateCommandr   BETAr1   detailed_helpr/   r   r   <module>r=      s    , &  ' G 1 ( 6		4 D%%(()T  * < D%%**+  , % r   