
                         J   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 e
j                   e
j                  e
j                  j                   e
j                  j"                  e
j                  j$                         G d	 d
e
j&                                      Zy)zGet IAM cluster policy command.    )absolute_import)division)unicode_literals)dataproc)iam_helpers)base)flagsc                   &    e Zd ZdZed        Zd Zy)GetIamPolicyzGet IAM policy for a cluster.

  Gets the IAM policy for a cluster, given a cluster name.

  ## EXAMPLES

  The following command prints the IAM policy for a cluster with the name
  `example-cluster-name-1`:

    $ {command} example-cluster-name-1
  c                     t        j                  | j                               }t        j                  |d|j
                         t        j                  j                  |       y )Nzretrieve the policy for)	dpDataprocReleaseTrackr	   AddClusterResourceArgapi_versionr   URI_FLAGRemoveFromParser)clsparserr   s      /lib/surface/dataproc/clusters/get_iam_policy.pyArgszGetIamPolicy.Args-   sG    {{3++-.H	(A ( 4 46MM""6*    c                    t        j                  | j                               }|j                  }|j                  j
                  j                         }|j                  |j                         |j                  |j                  t        j                                    }|j                  j                  j                  |      S )N)requestedPolicyVersion)options)resourcegetIamPolicyRequest)r   r   r   messagesCONCEPTSclusterParse2DataprocProjectsRegionsClustersGetIamPolicyRequestRelativeNameGetIamPolicyRequestGetPolicyOptionsr   !MAX_LIBRARY_IAM_SUPPORTED_VERSIONclientprojects_regions_clustersr   )selfargsr   r   cluster_refrequests         r   RunzGetIamPolicy.Run4   s    {{4,,./H  H--''--/KII))+$88--'2'T'T .  9 
 J G ??44AA'JJr   N)__name__
__module____qualname____doc__classmethodr   r-    r   r   r   r      s!    

 + +Kr   r   N)r1   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr	   UniverseCompatibleReleaseTracksr   ALPHABETAGAListCommandr   r3   r   r   <module>r>      s     & &  ' : 7 ( 5 T..33T5F5F5I5I"K4## "K "Kr   