
                         z    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
  G d d	ej                        Zy
)z&Fetch the IAM policy for an EkmConfig.    )absolute_import)division)unicode_literals)iam)base)resource_argsc                   &    e Zd ZdZed        Zd Zy)GetIamPolicya8  Get the IAM policy for an EkmConfig.

  Gets the IAM policy for the given location.

  Returns an empty policy if the resource does not have a policy set.

  ## EXAMPLES

  The following command gets the IAM policy for the EkmConfig
  within the location `us-central1`:

    $ {command} --location=us-central1
  c                 p    t        j                  | dd       t        j                  j	                  |        y )NTz
--location)r   AddKmsLocationResourceArgForKMSr   URI_FLAGRemoveFromParser)parsers    ,lib/surface/kms/ekm_config/get_iam_policy.pyArgszGetIamPolicy.Args)   s&    11&$MMM""6*    c                     |j                   j                  j                         }dj                  |j                  |j
                        }t        j                  |      S )Nz$projects/{0}/locations/{1}/ekmConfig)CONCEPTSlocationParseformat
projectsIdlocationsIdr   GetEkmConfigIamPolicy)selfargslocation_refekm_config_names       r   RunzGetIamPolicy.Run.   sL    ==))//1L<CC!9!9;O$$_55r   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r
   r
      s      + +6r   r
   N)r#   
__future__r   r   r   googlecloudsdk.api_lib.cloudkmsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.kmsr   ListCommandr
   r%   r   r   <module>r+      s.    - &  ' / ( 864## 6r   