
    %                     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 a keyring.    )absolute_import)division)unicode_literals)iam)base)flagsc                   &    e Zd ZdZed        Zd Zy)GetIamPolicyaJ  Get the IAM policy for a keyring.

  Gets the IAM policy for the given keyring.

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

  ## EXAMPLES

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

    $ {command} fellowship --location=us-central1
  c                     t        j                  | d       t        j                  | d       t        j                  j                  |        y )Nkeyringzwhose IAM policy to fetch)r   AddLocationFlagAddKeyRingArgumentr   URI_FLAGRemoveFromParser)parsers    *lib/surface/kms/keyrings/get_iam_policy.pyArgszGetIamPolicy.Args)   s5    	&),	V%@AMM""6*    c                 R    t        j                  t        j                  |            S )N)r   GetKeyRingIamPolicyr   ParseKeyRingName)selfargss     r   RunzGetIamPolicy.Run/   s    ""5#9#9$#?@@r   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r
   r
      s!     + +
Ar   r
   N)r   
__future__r   r   r   googlecloudsdk.api_lib.cloudkmsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.kmsr   ListCommandr
   r    r   r   <module>r&      s0    * &  ' / ( 0A4## Ar   