
                            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  ej                  ej                  j                  ej                  j                          G d	 d
ej"                               Zy)zExport a Looker instance.    )absolute_import)division)unicode_literals)	instances)base)flags)logc                   .    e Zd ZdZddiZed        Zd Zy)Exporta  Export a Looker instance.

  This command can fail for the following reasons:
        * The instance specified does not exist.
        * The active account does not have permission to access the given
          instance.
        * The Google Cloud Storage bucket does not exist.
  EXAMPLESa            To export an instance with the name `my-looker-instance` in the default
          region, run:

            $ {command} my-looker-instance --target-gcs-uri='gs://bucketName/folderName'
            --kms-key='projects/my-project/locations/us-central1/keyRings/my-key-ring/cryptoKeys/my-key'

          Note that the kms-key flag should be the full name of the kms key.
      c                 .    t        j                  |        y)z Register flags for this command.N)r   AddExportInstanceArgs)parsers    &lib/surface/looker/instances/export.pyArgszExport.Args0   s     
'    c                    |j                   j                  j                         }t        j                  ||| j                               }t        j                  j                  dj                  |j                  |j                               |S )Nz@Export request issued for: [{}]
Check operation [{}] for status.)CONCEPTSinstanceParser   ExportInstanceReleaseTrackr	   statusPrintformatname)selfargsinstance_refops       r   Runz
Export.Run5   si    ==))//1L		!	!,d6G6G6I	JBJJ	++16$--+I Ir   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r!    r   r   r   r      s1       
 - ( (r   r   N)r%   
__future__r   r   r   googlecloudsdk.api_lib.lookerr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.lookerr   googlecloudsdk.corer	   ReleaseTracksr   ALPHAGACommandr   r(   r   r   <module>r2      sf      &  ' 3 ( 3 # D%%++T->->-A-AB!T\\ ! C!r   