
                             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
0r\R                  " \R                   R"                  5       " S S\R$                  5      5       rg)PApply a KRM configuration to a Google Cloud Platform resource filename or stdin.    )absolute_import)division)unicode_literals)base)flags)
kcc_client)progress_trackerEXAMPLESz
      To create or update the resource in file 'my-resource.yaml' in the current project run:
        $ {command} my-resource.yaml
    c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Apply"   r   c                     [         R                  " U5        [         R                  " U5        UR                  R	                  S5        g )Nyaml)declarative_flagsAddResolveResourcesArgAddApplyPathArgdisplay_info	AddFormat)clsparsers     $lib/surface/resource_config/apply.pyArgs
Apply.Args'   s2    ,,V4%%f-
!!&)    c                    UR                   nUR                  n[        R                  " 5       nS n[        R
                  " SR                  U5      SS9   UR                  X#5      nS S S 5        U$ ! , (       d  f       U$ = f)NzApplying {}zApply Cancelled)messageaborted_message)PATHresolve_referencesr	   	KccClientr
   ProgressTrackerformatApplyConfig)selfargsresource_pathresolve_refsclientoutputs         r   Run	Apply.Run-   sx    IIM**L!!#FF		)	)$$]3)
+ !!->f
+ M	
+ 
+ Ms   A00
A? N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpclassmethodr   r+   __static_attributes__r-   r   r   r   r   "   s!    X -* *
	r   r   N)r2   
__future__r   r   r   googlecloudsdk.callioper   +googlecloudsdk.command_lib.util.declarativer   r   3googlecloudsdk.command_lib.util.declarative.clientsr	   googlecloudsdk.core.consoler
   r3   ReleaseTracksReleaseTrackALPHADeclarativeCommandr   r-   r   r   <module>r@      si    W &  ' ( R J 8 	 D%%++,D##  -r   