
    	                         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  SSKJr  \R                   " S	 S
\R                  5      5       rg)z.List keyhandles within a project and location.    )absolute_import)division)unicode_literals)
list_pager)base)flags)resource_argsc                   .    \ rS rSrSr\S 5       rS rSrg)List   a  List KeyHandle resources within a project and location.

Lists all KeyHandle resources within a given project and location.
Addtionally, can filter the list.

## EXAMPLES

The following command lists a maximum of five KeyHandle resources in the
location `global`:

  $ {command} --location=global --limit=5

The following command lists all KeyHandle resources in the location `global`
that have a resource type selector of `compute.googleapis.com/Instance`:

  $ {command} --location=global
  --resource-type=compute.googleapis.com/Instance
c                     [         R                  " U SS5        [        R                  " U S5        U R                  R                  S5        g )NTz
--locationz)table(name, kmsKey, resourceTypeSelector))r	   AddKmsLocationResourceArgForKMSr   AddResourceTypeSelectorFlagdisplay_info	AddFormat)parsers    #lib/surface/kms/key_handles/list.pyArgs	List.Args1   s9    11&$M	%%fd3
!!"MN    c                 R   [         R                  " 5       n[         R                  " 5       nUR                  R                  R                  5       nSUR                   S3nUR                  UR                  5       US9n[        R                  " UR                  USUR                  SS9$ )Nzresource_type_selector="")parentfilter
keyHandlespageSize)fieldlimitbatch_size_attribute)cloudkms_baseGetClientInstanceGetMessagesModuleCONCEPTSlocationParseresource_type.CloudkmsProjectsLocationsKeyHandlesListRequestRelativeNamer   YieldFromListprojects_locations_keyHandlesr   )selfargsclientmessageslocation_ref
filter_strrequests          r   RunList.Run8   s    ,,.F..0H==))//1L+D,>,>+?qAJEE((*: F G ##,,jj' r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r2   __static_attributes__r4   r   r   r   r      s"    & O Or   r   N)r9   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.cloudkmsr   r    googlecloudsdk.calliopegooglecloudsdk.command_lib.kmsr   r	   UniverseCompatibleListCommandr   r4   r   r   <module>rC      sI    5 &  ' ' A ( 0 8 ,4 , ,r   