
                             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  SSKJr  SSKJr  SSKJr  / SQr\R4                   " S S\R6                  5      5       rg)z)Command to create a Data Fusion instance.    )absolute_import)division)unicode_literals)encoding)
datafusion)waiter)arg_parsers)base)maintenance_utils)operation_poller)resource_args)	arg_utils)labels_util)log)basic
enterprise	developerc                   .    \ rS rSrSr\S 5       rS rSrg)Create$   a  Create and initialize a Cloud Data Fusion instance.

If run asynchronously with `--async`, exits after printing an operation
that can be used to poll the status of the creation operation via:

  {command} operations list

## EXAMPLES

To create instance `my-instance` in project `my-project`, location in
`my-location`, and zone in `my-zone` run:

  $ {command} my-instance --project=my-project --location=my-location --zone=my-zone
c                 L   [         R                  " U S5        [        R                  R	                  U 5        [
        R                  " U 5        U R                  SSS9  U R                  S[        SSS9  U R                  S	S
S9  U R                  SSS9  U R                  S[        R                  " 5       SSS9  U R                  SSSS9  U R                  SSSS9  U R                  SSSS9  [        R                  " U 5        [         R                  " 5       R	                  U 5        g )NzInstance to create.z--zonezCompute Engine zone in which the instance will be created. Only needed for DEVELOPER edition. For example: `--zone=us-central1-a`.)helpz	--editionr   zSEdition of the Data Fusion instance to create. For example: `--edition=enterprise`.)choicesdefaultr   z	--versionzcThe version of Cloud Data Fusion to use when creating the instance. For example: `--version=6.9.2`.z--patch_revisionzvPatch revision version of Cloud Data Fusion to use when creating the instance.For example: `--patch_revision=6.9.2.1`.z	--optionsz	KEY=VALUEzKOptions to use for instance creation, specified as KEY1=VALUE1,KEY2=VALUE2.)typemetavarr   z--enable_stackdriver_logging
store_truez9Enable Stackdriver logging for this Data Fusion instance.)actionr   z--enable_stackdriver_monitoringz<Enable Stackdriver monitoring for this Data Fusion instance.z--enable_rbaczHEnable granular role-based access control for this Data Fusion instance.)r   AddInstanceResourceArgr
   
ASYNC_FLAGAddToParserr   AddCreateLabelsFlagsadd_argument	_EDITIONSr	   ArgDictr   CreateArgumentsGroup
GetTagsArg)parsers    +lib/surface/data_fusion/instances/create.pyArgsCreate.Args6   s]   ((1FGOO'$$V,
^  _ /	  0 *  + 3  4   "0	  1 &H  J )K  M W  Y **62**62    c                 t   [         R                  " 5       nUR                  R                  R	                  5       nUR
                  nU(       d  SnUR                  nU(       d  SnUR                  nU(       d  0 nUR                  nU(       d  0 nUR                  nU(       d  SnUR                  n	U	(       d  Sn	UR                  n
U
(       d  Sn
[        R                  " S[         R                  " 5       R                  R                  R                   5      nUR#                  UR$                  5      nUR                  R                  UUUUR&                  UU	U
[(        R*                  " XbR                  R                  R,                  S5      [(        R*                  " XrR                  R                  R.                  S5      [0        R2                  " XR                  R                  R4                  5      S9
n[6        R8                  " X5        UR                  R;                  UUR=                  5       UR?                  5       RA                  5       S9nURB                  RD                  RG                  U5      nURH                  (       a&  [J        RL                  " URA                  5       SSS9  U$ [N        RP                  " [R        RT                  " 5       URV                  S	RY                  URV                  5      [         RZ                  [         RZ                  S
9  [J        RL                  " URA                  5       SSS9  g )N Fedition_enumT)
zoner   versionpatchRevisionenableStackdriverLoggingenableStackdriverMonitoring
enableRbacoptionslabelstags)instance
instanceIdparentr9   )kindis_asyncz<Waiting for [{}] to complete. This may take several minutes.)max_wait_mswait_ceiling_ms).df
DatafusionCONCEPTSr9   Parser1   r0   r6   r7   enable_stackdriver_loggingenable_stackdriver_monitoringenable_rbacr   ChoiceEnumMappermessagesInstanceTypeValueValuesEnumGetEnumForChoiceeditionpatch_revisionr   DictToAdditionalPropertyMessageOptionsValueLabelsValuer   GetTagsFromArgs	TagsValuer   SetMaintenanceWindow1DatafusionProjectsLocationsInstancesCreateRequestNameParentRelativeNameclientprojects_locations_instancesr   async_r   CreatedResourcer   WaitForr   OperationPollernameformatOPERATION_TIMEOUT)selfargsr   instance_refr1   r0   r6   r7   rD   rE   rF   edition_mapperrL   r9   req	operations                   r)   Run
Create.Runb   s   J==))//1L llGg99DdllGg[[Ff!%!@!@%#( $($F$F!(&+#""Kk//0099MMON--dll;G""++))!;$A88((11>>
 77''00<<d
 **%%..88
 , H$ **4:



O
O$$&""$113 P 5C
 !!>>EEcJI{{	

#
#
%JGnn

*
*
,
..
H
O
Onn**..0 


#
#
%JHr,    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr*   rg   __static_attributes__ri   r,   r)   r   r   $   s#     )3 )3VEHr,   r   N)rn   
__future__r   r   r   apitools.base.pyr   "googlecloudsdk.api_lib.data_fusionr   r@   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper	   r
   &googlecloudsdk.command_lib.data_fusionr   r   r   $googlecloudsdk.command_lib.util.apisr   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   r$   DefaultUniverseOnlyCommandr   ri   r,   r)   <module>r|      sd    0 &  ' % ? . / ( D C @ : < #0	 BHT\\ BH BHr,   