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/fields/update.yaml
- release_tracks: [ALPHA, BETA, GA]
  help_text:
    brief: Update the index configuration of the given field.
    description: |
      Update the index configuration of the given field.

      This creates an exemption for the field in question, allowing one to modify the field's index
      settings and override the defaults.
    # Note: currently all indexes are collection scoped; collection group scoped indexes are not yet
    # supported. When they are, these examples will need to be updated to include queryScope keys in
    # addition to order/arrayConfig.
    examples: |
      The following command creates an exemption for the `timestamp` field in the `Events`
      collection group, in which all indexes are disabled:

        $ {command} timestamp \
            --collection-group=Events
            --disable-indexes

        $ {command} timestamp \
            --database=(default)
            --collection-group=Events
            --disable-indexes

      The following command creates an exemption for the `timestamp` field in the `Events`
      collection group, in which the list of indexes is explicitly set to [ASCENDING, DESCENDING]:

        $ {command} timestamp \
            --collection-group=Events \
            --index=order=ASCENDING \
            --index=order=DESCENDING

      The following command clears the exemption on the `timestamp` field in the `Events` collection
      group, so that the field will return to inheriting its index settings from its ancestors:

        $ {command} timestamp \
            --collection-group=Events --clear-exemption

  request:
    collection: firestore.projects.databases.collectionGroups.fields
    static_fields:
      updateMask: indexConfig
    resource_method_params:
      googleFirestoreAdminV1Field.name: '{__relative_name__}'
    modify_request_hooks:
    - googlecloudsdk.command_lib.firestore.util:ValidateFieldUpdateRequest
    - googlecloudsdk.command_lib.firestore.util:AddIndexConfigToUpdateRequest

  async:
    collection: firestore.projects.databases.operations
    api_version: v1

  update:
    read_modify_update: false
    disable_auto_field_mask: true

  arguments:
    resource:
      help_text: Field to update.
      # Since it's currently not possible to update database default or collection group default
      # index settings, we use 'field' here instead of 'field_with_default'
      spec: !REF googlecloudsdk.command_lib.firestore.resources:field

    params:
    - group:
        mutex: true
        required: true
        params:
        - _REF_: googlecloudsdk.command_lib.firestore.flags:index
        - _REF_: googlecloudsdk.command_lib.firestore.flags:disable_indexes
        - _REF_: googlecloudsdk.command_lib.firestore.flags:clear_exemption