
                            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)zFetch the IAM policy for a key.    )absolute_import)division)unicode_literals)iam)base)flags)resource_argsc                   .    \ rS rSrSr\S 5       rS rSrg)GetIamPolicy   aJ  Get the IAM policy for a key.

Gets the IAM policy for the given key.

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

## EXAMPLES

The following command gets the IAM policy for the key `frodo` within
the keyring `fellowship` and location `global`:

  $ {command} frodo --keyring=fellowship --location=global
c                 r    [         R                  " U SS5        [        R                  R	                  U 5        g )NTkey)r	   AddKmsKeyResourceArgForKMSr   URI_FLAGRemoveFromParser)parsers    &lib/surface/kms/keys/get_iam_policy.pyArgsGetIamPolicy.Args,   s&    ,,VT5AMM""6*    c                 V    [         R                  " [        R                  " U5      5      $ )N)r   GetCryptoKeyIamPolicyr   ParseCryptoKeyName)selfargss     r   RunGetIamPolicy.Run1   s    $$U%=%=d%CDDr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r   __static_attributes__r   r   r   r   r      s!     + +Er   r   N)r#   
__future__r   r   r   googlecloudsdk.api_lib.cloudkmsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.kmsr   r	   ReleaseTracksReleaseTrackBETAGAListCommandr   r   r   r   <module>r/      si    & &  ' / ( 0 8 D%%**D,=,=,@,@AE4## E BEr   