
    
                     
   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
iZ ej                  ej                   j"                  ej                   j$                         G d dej&                               Zy)zVCommand for retrieving declarative configurations for Google Cloud Platform resources.    )absolute_import)division)unicode_literals)base)flags)
kcc_client)logEXAMPLESa  
    To export all resources in a project to a local directory, run:

      $ {command} --path=/path/to/dir/

    To export all resources in a organization to stdout, run:

      $ {command} --organization=12345 --path=-

    To export all resources in a folder to stdout in Terraform format,
    run:

      $ {command} --folder=12345 --resource-format=terraform

    To export all resources in a project to stdout, using a custom Google Storage bucket for interim results,
    run:

      $ {command} --project=my-project --storage-path='gs://your-bucket-name/your/prefix/path'

    To export all Storage Bucket and Compute Instances resources in project my-project to stdout,
    run:

      $ {command} --project=my-project --resource-types=storage.cnrm.cloud.google.com/StorageBucket,ComputeInstance

    To export all resource types in file 'types-file.txt' in project my-project to stdout,
    run:

      $ {command} --project=my-project --resource-types-file=types-file.txt
    c                   *    e Zd ZdZeZed        Zd Zy)Exportz[Export configurations for all assets within the specified project, organization, or folder.c                 .    t        j                  |       y )N)declarative_flagsAddBulkExportArgs)clsparsers     *lib/surface/resource_config/bulk_export.pyArgszExport.ArgsC   s    ''/    c                     t        j                         }|j                  d      rt        j                  d       d |_        y |j                  |       y )Nformatz{`--format` flag not supported for bulk-export. To change the format of exported resources use the `--resource-format` flag.)r   	KccClientIsSpecifiedr	   warningr   
BulkExport)selfargsclients      r   Runz
Export.RunG   sP    !!#F!	kk . / dk  
r   N)	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpclassmethodr   r    r   r   r   r   =   s!    c -0 0	r   r   N)r"   
__future__r   r   r   googlecloudsdk.callioper   +googlecloudsdk.command_lib.util.declarativer   r   3googlecloudsdk.command_lib.util.declarative.clientsr   googlecloudsdk.corer	   r#   ReleaseTracksReleaseTrackALPHABETADeclarativeCommandr   r&   r   r   <module>r1      s{    ] &  ' ( R J # 	D D%%++T->->-C-CDT$$  Er   