
    
                        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                  ej                  j                  ej                  j                         G d	 d
ej                                Zy)z3Command to list the details of a SHA custom module.    )absolute_import)division)unicode_literals)clients)base)flags)parsingc                   &    e Zd ZdZed        Zd Zy)Lista  List the details of Security Health Analyics custom modules.

  List the details of the resident and inherited Security Health Analytics
  custom modules for the specified folder or project. For an organization, this
  command lists only the custom modules that are created at the organization
  level. Custom modules created in child folders or projects are not included in
  the list. To list the resident custom modules and the modules that are created
  in child folders or projects, use `gcloud scc manage custom-modules sha
  list-descendant`.

  ## EXAMPLES

  To list resident and inherited Security Health Analytics custom modules for
  organization `123`, run:

  $ {command} --organization=organizations/123

  To list resident and inherited Security Health Analytics custom modules for
  folder `456`, run:

  $ {command} --folder=folders/456

  To list resident and inherited Security Health Analytics custom modules for
  project `789`, run:

  $ {command} --project=projects/789

  You can also specify the parent more generally:

  $ {command} 123456 --parent=organizations/123

  Or just specify the fully qualified module name:

  $ {command}
  organizations/123/locations/global/securityHealthAnalyticsCustomModules/123456
  c                     t         j                  j                  |        t        j                  d      j                  |        y )NT)required)r   URI_FLAGRemoveFromParserr   CreateParentFlagAddToParser)parsers    1lib/surface/scc/manage/custom_modules/sha/list.pyArgsz	List.ArgsB   s-    MM""6*	D)55f=    c                     t        j                  |      }|j                  }|j                  }t	        j
                         }|j                  |||      S )N)	page_sizeparentlimit)r	   GetParentResourceNameFromArgsr   r   r   SHACustomModuleClientr   )selfargsr   r   r   clients         r   RunzList.RunG   sQ    2248FIJJE**,F;;   r   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r   r      s!    #J > >r   r   N)r#   
__future__r   r   r   %googlecloudsdk.api_lib.scc.manage.shar   googlecloudsdk.callioper   %googlecloudsdk.command_lib.scc.manager   r	   ReleaseTracksReleaseTrackGAALPHAListCommandr   r%   r   r   <module>r/      sh    : &  ' 9 ( 7 9 D%%(($*;*;*A*AB64 6 C6r   