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/current/lib/surface/firestore/indexes/composite/list.yaml
- release_tracks: [ALPHA, BETA, GA]
  help_text:
    brief: List composite indexes.
    description: List composite indexes.
    examples: |
      The following command lists all composite indexes in the database:

        $ {command}

        $ {command} --database=(default)

      The following command lists composite indexes in the `Events` collection group:

        $ {command} --filter=COLLECTION_GROUP:Events

  request:
    collection: firestore.projects.databases.collectionGroups.indexes

  response:
    id_field: name

  arguments:
    resource:
      help_text: Collection group of the index.
      is_positional: false
      # By using collection_group_with_default this resource arg is correctly determined to be
      # optional and uses the special '-' collection group to list all indexes in the database.
      spec: !REF googlecloudsdk.command_lib.firestore.resources:collection_group_with_default
      # Ideally the API would only return indexes whose collection group matches the one in the
      # request; however currently no matter what collection group you provide you'll get a list of
      # all the indexes in all collection groups. Thus we remove the collection group flag here
      # since it has no effect. The user can always filter the responses by collection group using
      # the gcloud wide --filter flag.
      removed_flags:
      - collection-group

  output:
    # This format string gets the field config table (fieldPath,order,arrayConfig) to show up as
    # additional columns in the same row, as opposed to indented on the next line. Note that the
    # double quotes are needed as opposed to a multi-line YAML string, since the latter escapes
    # newline characters which we need to provide to .join() in order to get each field onto its
    # own line.
    #
    # We could also use
    # format: |
    #   table[box](
    #     name.basename(),
    #     name.segment(-3):label=COLLECTION_GROUP,
    #     queryScope,
    #     state,
    #     fields.slice(:-1):format="table(fieldPath,order,arrayConfig)")
    # if we didn't care about the field config info showing up as columns in the existing row.
    #
    # TODO(b/120985936): Use an inline nested table when that's made possible
    format: "table[all-box](\
               name.basename(),\
               name.segment(-3):label=COLLECTION_GROUP:sort=1,\
               queryScope,\
               state,\
               apiScope,\
               fields.*extract('fieldPath').*flatten().join('\n'):label=FIELD_PATHS,\
               fields.*extract('order').*flatten().join('\n'):label=ORDER,\
               fields.*extract('arrayConfig').*flatten().join('\n'):label=ARRAY_CONFIG,\
               fields.*extract('vectorConfig').*extract('dimension').*flatten().join('\n'):label=VECTOR_CONFIG)"
    release_tracks: [BETA, GA]