
     	                         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                   G d	 d
e
j                               Zy)z*Get IAM autoscaling policy policy command.    )absolute_import)division)unicode_literals)dataproc)iam_helpers)base)flagsc                   &    e Zd ZdZed        Zd Zy)GetIamPolicya.  Get IAM policy for an autoscaling policy.

  Gets the IAM policy for an autoscaling policy, given an autoscaling policy ID.

  ## EXAMPLES

  The following command prints the IAM policy for an autoscaling policy with the
  ID `example-autoscaling-policy`:

    $ {command} example-autoscaling-policy
  c                     t        j                  | j                               }t        j                  |d|j
                         y )Nzretrieve the IAM policy for)api_version)dpDataprocReleaseTrackr	   AddAutoscalingPolicyResourceArgr   )clsparserr   s      ;lib/surface/dataproc/autoscaling_policies/get_iam_policy.pyArgszGetIamPolicy.Args)   s6    {{3++-.H	))-8;O;OQ    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autoscaling_policyParse=DataprocProjectsRegionsAutoscalingPoliciesGetIamPolicyRequestRelativeNameGetIamPolicyRequestGetPolicyOptionsr   !MAX_LIBRARY_IAM_SUPPORTED_VERSIONclient$projects_regions_autoscalingPoliciesr   )selfargsr   r   
policy_refrequests         r   RunzGetIamPolicy.Run/   s    {{4,,./H  H11779J 	NN,,. ( < < 11+6+X+X 2  != ! 	O 	
  ????LL r   N)__name__
__module____qualname____doc__classmethodr   r+    r   r   r   r      s"    
 Q Q
r   r   N)r/   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr	   DefaultUniverseOnlyCommandr   r1   r   r   <module>r8      sD    1 &  ' : 7 ( 5 &4<< & &r   