
    B                         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)z9Implementation of managed-folders get-iam-policy command.    )absolute_import)division)unicode_literals)api_factory)base)errors_util)storage_urlc                   0    e Zd ZdZdddZed        Zd Zy)GetIamPolicyz(Get the IAM policy for a managed folder.z
      Get the IAM policy for a managed folder. For more information, see [Cloud
      Identity and Access
      Management](https://cloud.google.com/storage/docs/access-control/iam).
      a  
      To get the IAM policy for a managed folder `managed-folder` in a bucket `bucket`:

        $ {command} gs://bucket/managed-folder/

      To output the IAM policy for `gs://bucket/managed-folder` to a file:

        $ {command} gs://bucket/managed-folder/ > policy.txt
      )DESCRIPTIONEXAMPLESc                 *    | j                  dd       y )Nurlz3URL of the managed folder to get the IAM policy of.)help)add_argument)parsers    5lib/surface/storage/managed_folders/get_iam_policy.pyArgszGetIamPolicy.Args0   s    
I      c                 
   t        j                  |j                        }t        j                  |j
                  |       t        j                  |j                        }|j                  |j                  |j                        S )N)r	   storage_url_from_stringr   r   "raise_error_if_not_gcs_folder_typecommand_pathr   get_apischemeget_managed_folder_iam_policybucket_nameresource_name)selfargsr   clients       r   RunzGetIamPolicy.Run6   sb    

-
-dhh
7C2243D3DcJ  ,F//** r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r"    r   r   r   r      s/    0


-"  
r   r   N)r&   
__future__r   r   r   googlecloudsdk.api_lib.storager   googlecloudsdk.callioper   "googlecloudsdk.command_lib.storager   r	   UniverseCompatibleCommandr   r)   r   r   <module>r0      sE    @ &  ' 6 ( : :  4<<    r   