
    k
                         S r SSKJr  SSKJr  SSKJr  SSK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\
R$                  5      rg)z"Export autoscaling policy command.    )absolute_import)division)unicode_literalsN)dataproc)base)flags)util)filesc                   .    \ rS rSrSr\S 5       rS rSrg)Export   a
  Export an autoscaling policy.

Exporting an autoscaling policy is similar to describing one, except that
export omits output only fields, such as the policy id and resource name. This
is to allow piping the output of export directly into import, which requires
that output only fields are omitted.

## EXAMPLES

The following command saves the contents of autoscaling policy
`example-autoscaling-policy` to a file so that it can be imported later:

  $ {command} example-autoscaling-policy --destination=saved-policy.yaml
c                     [         R                  " U R                  5       5      n[        R                  " USUR
                  5        [        R                  " U5        g )Nexport)dpDataprocReleaseTrackr   AddAutoscalingPolicyResourceArgapi_versionexport_utilAddExportFlags)clsparserr   s      3lib/surface/dataproc/autoscaling_policies/export.pyArgsExport.Args.   sC    {{3++-.H	))&(*2*>*>@v&    c                 R   [         R                  " U R                  5       5      nUR                  nUR                  R
                  R                  5       nUR                  UR                  5       S9nUR                  R                  R                  U5      nS Ul        S Ul        UR                  (       a>  [        R                   " UR                  5       n["        R$                  " XgS9  S S S 5        g ["        R$                  " U[&        R(                  S9  g ! , (       d  f       g = f)N)name)messagestream)r   r   r   messagesCONCEPTSautoscaling_policyParse4DataprocProjectsRegionsAutoscalingPoliciesGetRequestRelativeNameclient$projects_regions_autoscalingPoliciesGetidr   destinationr
   
FileWriterr   r   sysstdout)selfargsr   r!   
policy_refrequestpolicyr    s           r   Run
Export.Run5   s    {{4,,./H  H11779JKK$$& L (G__AAEEgNF FIFKD,,-69 .- 

;	 .-s   D
D& N)	__name__
__module____qualname____firstlineno____doc__classmethodr   r4   __static_attributes__r6   r   r   r   r      s      ' '<r   r   )r;   
__future__r   r   r   r-   googlecloudsdk.api_lib.dataprocr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr   !googlecloudsdk.command_lib.exportr	   r   googlecloudsdk.core.utilr
   Commandr   r6   r   r   <module>rE      s5    ) &  ' 
 : ( 5 A *+<T\\ +<r   