
    	                         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lmZ  G d	 d
e
j                        Zdddde_        y)z)Command to get IAM policy for a resource.    )absolute_import)division)unicode_literals)base_classes)client)base)flagsc                   &    e Zd ZdZed        Zd Zy)GetIamPolicy8Get the IAM policy for a Compute Engine backend service.c                 B    t         j                  j                  |        y )N)r	   #GLOBAL_REGIONAL_BACKEND_SERVICE_ARGAddArgument)parsers    6lib/surface/compute/backend_services/get_iam_policy.pyArgszGetIamPolicy.Args   s    	--99&A    c                 <   t        j                  | j                               }t        j                  j                  ||j                  t        j                  |j                              }t        j                  ||j                        }|j                         S )N)scope_lister)compute_client)r   ComputeApiHolderReleaseTrackr	   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerr   BackendServicer   )selfargsholderbackend_service_refbackend_services        r   RunzGetIamPolicy.Run#   s    **4+<+<+>?F11CC&<<V]]K 	D 	M  ++FMM;O ''))r   N)__name__
__module____qualname____doc__staticmethodr   r#    r   r   r   r      s    @B B*r   r   r   a  
      *{command}* displays the IAM policy associated with a
    Compute Engine backend service 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.  z    To print the IAM policy for a given backend service, run:

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

      $ {command} my-backend-service --global
      )briefDESCRIPTIONEXAMPLESN)r'   
__future__r   r   r   googlecloudsdk.api_lib.computer   /googlecloudsdk.api_lib.compute.backend_servicesr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r   3googlecloudsdk.command_lib.compute.backend_servicesListCommandr   detailed_helpr)   r   r   <module>r5      sN    0 &  ' 7 B ( E E*4## *. 	C	;	
 r   