
                            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  \R                  " \R                  R                  5      \R                   " S S\R                   5      5       5       r\R                  " \R                  R$                  5      \R                   " S	 S
\5      5       5       rSSSSS.\l        g)z)Command to get IAM policy for a resource.    )base_classes)base)flags)scope)backend_buckets_utilsc                   .    \ rS rSrSr\S 5       rS rSrg)GetIamPolicy   7Get the IAM policy for a Compute Engine backend bucket.c                     [         R                  R                  U 5        [        R                  R                  U 5        g )N)r   &GLOBAL_REGIONAL_BACKEND_BUCKET_ARG_IAMAddArgumentr   URI_FLAGRemoveFromParser)parsers    5lib/surface/compute/backend_buckets/get_iam_policy.pyArgsGetIamPolicy.Args   s(    	00<<VDMM""6*    c                 N   [         R                  " U R                  5       5      nUR                  n[        R
                  R                  UUR                  [        R                  R                  [        R                  " UR                  5      S9n[        R                  " XC5      $ )N)default_scopescope_lister)r   ComputeApiHolderReleaseTrackclientr   r   ResolveAsResource	resourcescompute_scope	ScopeEnumGLOBALcompute_flagsGetDefaultScopeListerr   r	   )selfargsholderr   backend_bucket_refs        r   RunGetIamPolicy.Run$   s    **4+<+<+>?F]]F44FF'1188&<<V]]K	 	G 	
  !--.@IIr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r'   __static_attributes__r)   r   r   r	   r	      s      @+ +Jr   r	   c                       \ rS rSrSrSrg)GetIamPolicyAlpha3   r   r)   N)r*   r+   r,   r-   r.   r0   r)   r   r   r2   r2   3   s     @r   r2   r   a  
      *{command}* displays the IAM policy associated with a
    Compute Engine backend bucket in a project. If formatted as JSON,
    the output can be edited and used as a policy file for
    set-iam-policy. The output includes an "etag" field
    identifying the version emitted and allowing detection of
    concurrent policy updates; see
    $ {parent} set-iam-policy for additional details.  a5      To print the IAM policy for a given regional backend bucket, run:

      $ {command} my-backend-bucket --region=REGION

    To print the IAM policy for a given global backend bucket, run either of
    the following:

      $ {command} my-backend-bucket --global

      $ {command} my-backend-bucket
      z        This command uses the compute API. The full documentation for this
    API can be found at: https://cloud.google.com/compute/)briefDESCRIPTIONEXAMPLESzAPI REFERENCEN)r.   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r!   r   r   2googlecloudsdk.command_lib.compute.backend_bucketsr   ReleaseTracksr   BETADefaultUniverseOnlyListCommandr	   ALPHAr2   detailed_helpr)   r   r   <module>rA      s    0 8 ( E E T D D%%**+J4## J  ,J. D%%++,@ @  -@ G;	
>3 r   