
    j                         d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z	 ddl
mZ  e	j                  e	j                  j                  e	j                  j                         G d	 d
e	j                                Zy)z-Command for spanner databases get-iam-policy.    )absolute_import)division)unicode_literalsN)	databases)base)resource_argsc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)GetIamPolicyz0Get the IAM policy for a Cloud Spanner database.EXAMPLESzw        To print the IAM policy for a given Cloud Spanner database, run:

          $ {command} my-database-id
        c                 n    t        j                  | d       t        j                  j	                  |        y)zSee base class.zto get IAM policy binding forN)r   AddDatabaseResourceArgr   URI_FLAGRemoveFromParser)parsers    /lib/surface/spanner/databases/get_iam_policy.pyArgszGetIamPolicy.Args)   s*     (()HJMM""6*    c                 p    t        j                  |j                  j                  j	                               S )zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    )r   r
   CONCEPTSdatabaseParse)selfargss     r   RunzGetIamPolicy.Run0   s(     !!$--"8"8">">"@AAr   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r    r   r   r
   r
      s>    8 
(//  - + +
Br   r
   )r   
__future__r   r   r   r   googlecloudsdk.api_lib.spannerr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   ReleaseTracksReleaseTrackGABETAListCommandr
   r#   r   r   <module>r-      sk    4 &  '  4 ( < D%%(($*;*;*@*@AB4## B BBr   