
    	                        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  \R                  " \R                  R                  \R                  R                  5       " S	 S
\R                   5      5       rg)z4Command to describe the access policy for a service.    )absolute_import)division)unicode_literals)services_util)base)arg_parsers)common_flagsc                   .    \ rS rSrSr\S 5       rS rSrg)GetIamPolicy   zDescribes the IAM policy for a service.

Gets the IAM policy for a produced service, given the service name.

## EXAMPLES

To print the IAM policy for a service named `my-service`, run:

  $ {command} my-service
c                     [         R                  " SS9nUR                  U 5        [        R                  R                  U 5        g)zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go
      on the command line after this command. Positional arguments are
      allowed.
z#whose IAM policy is to be described)suffixN)r	   producer_service_flagAddToParserr   URI_FLAGRemoveFromParser)parserservice_flags     0lib/surface/endpoints/services/get_iam_policy.pyArgsGetIamPolicy.Args)   s7      5546LV$MM""6*    c                     [         R                  " 5       n[         R                  " 5       n[        R                  " UR
                  5      nUR                  US9nUR                  R                  U5      $ )a  Run 'service-management get-iam-policy'.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
      with.

Returns:
  The response from the access API call.

Raises:
  HttpException: An http error response was received while executing api
      request.
)
servicesId)	r   GetMessagesModuleGetClientInstancer   GetServiceNameFromArgservice,ServicemanagementServicesGetIamPolicyRequestservicesr   )selfargsmessagesclientr   requests         r   RunGetIamPolicy.Run7   sd     ..0H,,.F//=GCC D G ??''00r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r&   __static_attributes__r(   r   r   r   r      s     	 + +1r   r   N)r-   
__future__r   r   r    googlecloudsdk.api_lib.endpointsr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.endpointsr   r	   ReleaseTracksReleaseTrackBETAGAListCommandr   r(   r   r   <module>r9      sf     ; &  ' : ( < = D%%**D,=,=,@,@A014## 01 B01r   