HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/lib/surface/pam/grants/search.yaml
- release_tracks: [ALPHA, BETA, GA]

  command_type: LIST

  help_text:
    brief: Search for and list all Privileged Access Manager (PAM) grants you have created, have approved, or can approve.
    description: Search for and list all Privileged Access Manager (PAM) grants you have created, have approved, or can approve.
    examples: |
      The following command searches for and lists all grants you have created which are associated
      with an entitlement with the full name ``ENTITLEMENT_NAME'':

      $ {command} --entitlement=ENTITLEMENT_NAME --caller-relationship=had-created

      The following command searches for and lists all grants you have approved or denied which are
      associated with an entitlement with the full name ``ENTITLEMENT_NAME'':

      $ {command} --entitlement=ENTITLEMENT_NAME --caller-relationship=had-approved

      The following command searches for and lists all grants you can approve which are associated
      with an entitlement with the full name ``ENTITLEMENT_NAME'':

      $ {command} --entitlement=ENTITLEMENT_NAME --caller-relationship=can-approve

  request:
    ALPHA:
      api_version: v1alpha
    BETA:
      api_version: v1beta
    GA:
      api_version: v1
    method: search
    collection:
    - privilegedaccessmanager.projects.locations.entitlements.grants
    - privilegedaccessmanager.folders.locations.entitlements.grants
    - privilegedaccessmanager.organizations.locations.entitlements.grants

  arguments:
    params:
    - arg_name: entitlement
      resource_spec: !REF googlecloudsdk.command_lib.pam.resources:entitlement
      is_parent_resource: true
      is_primary_resource: true
      is_positional: false
      required: true
      help_text: |
        Entitlement the grants are associated with.
    - api_field: callerRelationship
      arg_name: caller-relationship
      required: true
      choices:
      - arg_value: had-created
        enum_value: HAD_CREATED
      - arg_value: had-approved
        enum_value: HAD_APPROVED
      - arg_value: can-approve
        enum_value: CAN_APPROVE
      help_text: |
        Whether to return grants you have created, have approved, or can approve.