
                         2   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KJr  SS	KJr  SS
KJr  SSKJr  SSKJr  \R*                  " \R,                  R.                  \R,                  R0                  5       " S S\R2                  5      5       rg)z.`gcloud dataplex environments create` command.    )absolute_import)division)unicode_literals)environment)util)
exceptions)arg_parsers)base)resource_args)labels_util)logc                   `    \ rS rSrSrSS0r\S 5       r\R                  " S5      S 5       r
Srg	)
Create   zCreate a Dataplex Environment.EXAMPLESa  
          To create a Dataplex Environment `test-environment`  within lake `test-lake` in
          location `us-central1` inside project `test-project` , run:

            $ {command} test-environment  --project=test-project --location=us-central1 --lake=test-lake  --os-image-version=1.0

          To know about the other required arguments to create an environment run:

            $ gcloud dataplex environment create --help

          c           	      ~   [         R                  " U S5        U R                  SSSS9  U R                  SSSS9  U R                  SS	S9nUR                  S
S9nUR                  S[        SSSS9  UR                  S[        SSSS9  UR                  S[        SSSS9  UR                  SSS9nUR                  SSSS9  UR                  S/ S[
        R                  " 5       SSS9  UR                  S/ S[
        R                  " 5       SSS9  UR                  SS [
        R                  " 5       SS!S"9  U R                  S#S9nUR                  S$SS%S9  UR                  S&S'SSS(S)9  U R                  SSS*S+9nUR                  S,S'SS-S.9  [        R                  R                  U5        [        R                  " U 5        g )/Nzto create a Environment to.z--descriptionFzDescription of the Environment)requiredhelpz--display-namezDisplay Name of the EnvironmentTzFConfiguration for the underlying infrastructure used to run workloads.zDCompute resources associated with the analyze interactive workloads.)r   z--compute-disk-size-gbd   z*Size in GB of the disk. Default is 100 GB.)typedefaultr   r   z--compute-node-countr   z,Total number of worker nodes in the cluster.z--compute-max-node-countz%Maximum number of configurable nodes.z.Software Runtime Configuration to run Analyze.z--os-image-versionzDataplex Image version.z--os-image-java-librariesOS_IMAGE_JAVA_LIBRARIESzList of Java jars to be included in the runtime environment. Valid input includes Cloud Storage URIs to Jar binaries. For example, gs://bucket-name/my/path/to/file.jar)r   metavarr   r   r   z--os-image-python-packagesOS_IMAGE_PYTHON_PACKAGESzA list of python packages to be installed. Valid formats include Cloud Storage URI to a PIP installable library. For example, gs://bucket-name/my/path/to/lib.tar.gzz--os-image-propertiesOS_IMAGE_PROPERTIESzOverride to common configuration of open source components installed on the Dataproc cluster. The properties to set on daemon config files. Property keys are specified in `prefix:property` format.)r   r   r   r   zEConfiguration for sessions created for the environment to be created.z--session-max-idle-durationzjThe idle time configuration of the session. The session will be auto-terminated at the end of this period.z--session-enable-fast-startup
store_truezEnables fast startup. This causes sessions to be pre-created and available for faster startup to enable interactive exploration use-cases.)actionr   r   r   z:At most one of --async | --validate-only can be specified.)mutexr   r   z--validate-onlyz:Validate the create action, but don't actually perform it.)r   r   r   )r   AddEnvironmentResourceArgadd_argument	add_groupintr	   ArgListArgDictr
   
ASYNC_FLAGAddToParserr   AddCreateLabelsFlags)parserinfrastructure_speccompute_resourcesos_image_runtimesession_specasync_groups         +lib/surface/dataplex/environments/create.pyArgsCreate.Args3   s   ++F,IK
%.N  P
.  0 !**U +  ,55S 6  "" 9 # ; ""; # = """4 # 6 +44L 5 N!!t2K " M!!#)  " w "  !!$*  " t "  !!%  " T "  ##T $ L %y  
 ' Z   ""I # KK J	  L
 	OO,$$V,    z-Status code: {status_code}. {status_message}.c           
      P   UR                   R                  R                  5       n[        R                  " 5       nUR
                  R                  [        R                  " 5       R                  UR                  5       UR                  5       R                  5       UR                  [        R                  " U5      S95      n[        USS5      nU(       a   [        R                   R#                  S5        g [        USS5      nU(       df  [        R$                  " U5      n[        R&                  " UR(                  SR+                  UR,                  UR.                  UR0                  5      S9  U$ [        R                   R#                  SR+                  X$R(                  5      5        U$ )	N)environmentIdparentvalidateOnly googleCloudDataplexV1Environmentvalidate_onlyFzValidation complete.async_zFEnvironment created in lake [{0}] in project [{1}] with location [{2}])detailsz9Creating environment with path [{0}] and operation [{1}].)CONCEPTSr   Parsedataplex_utilGetClientInstance%projects_locations_lakes_environmentsr   GetMessageModule7DataplexProjectsLocationsLakesEnvironmentsCreateRequestNameParentRelativeNamer7   #GenerateEnvironmentForCreateRequestgetattrr   statusPrintWaitForOperationCreatedResourcenameformatlakesId
projectsIdlocationsId)selfargsenvironment_refdataplex_clientcreate_req_opr7   r8   responses           r.   Run
Create.Run   s\    mm//557O#557O#IIPP&& 	

A
A)..0"))+88:++-800.115.7	 B 89M D/59M	jj-.T8U+F--m<h	
--Z6/))?+E+E!--/0
 oJJCJJ//	12 r1    N)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr/   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionrU   __static_attributes__rW   r1   r.   r   r      sO    & -  V- V-p 44577r1   r   N)r\   
__future__r   r   r   googlecloudsdk.api_lib.dataplexr   r   r<   googlecloudsdk.api_lib.utilr   r_   googlecloudsdk.callioper	   r
   #googlecloudsdk.command_lib.dataplexr   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   ReleaseTracksReleaseTrackALPHAGACommandr   rW   r1   r.   <module>rn      ss    5 &  ' 7 A F / ( = < # D%%++T->->-A-ABLT\\ L CLr1   