HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
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,pcntl_unshare,
Upload Files
File: //lib/google-cloud-sdk/lib/surface/memcache/instances/update.yaml
- help_text:
    brief: |
      Update a Memorystore Memcached instance.
    description: |
      Update a Memcached instance with one or more of the following actions:
        * Scale up or down the number of nodes in the instance.
        * Stage an update to instance configuration parameters.
        * Update the instance metadata (display name, labels).

      Updating parameters cannot be combined with any other update actions in the same call.
      All other update actions can be combined in the same call.
    examples: |
      To scale a Memcached instance named 'my-memcache-instance' in region 'us-central1' to have
      3 nodes, run:

        $ {command} my-memcache-instance --node-count=3 --region=us-central1

      To stage an update to the parameters 'protocol' and 'track-sizes' for a Memcached instance
      named 'my-memcache-instance' in region 'us-central1', run:

        $ {command} my-memcache-instance --parameters="protocol=ascii,track-sizes=true" \
            --region=us-central1

      To update a Memcached instance named 'my-memcache-instance' in region 'us-central1' to
      have the display name "Foo Cache Service" and the labels 'env' and 'service', run:

        $ {command} my-memcache-instance --display-name="Foo Cache Service" \
            --labels="env=test,service=foo"


  release_tracks: [ALPHA, BETA]
  arguments:
    resource:
      spec: !REF googlecloudsdk.command_lib.memcache.resources:instance
      help_text: |
        Arguments and flags that specify the Memcached instance to update.
    params:
    - group:
        mutex: true
        required: true
        params:
        - group:
            params:
            - arg_name: display-name
              api_field: instance.displayName
              help_text: An arbitrary and optional user provided name for the instance.
            - arg_name: labels
              api_field: instance.labels.additionalProperties
              metavar: KEY=VALUE
              help_text: |
                List of label KEY=VALUE pairs to add.
              type:
                arg_dict:
                  flatten: true
                  spec:
                  - api_field: key
                  - api_field: value
            - arg_name: node-count
              api_field: instance.nodeCount
              help_text: |
                Number of memcache nodes in this instance. Valid values range from 1 to 20.
        - arg_name: parameters
          api_field: instance.parameters.params
          metavar: KEY=VALUE
          help_text: |
            User defined parameters to apply to the memcached process on each node. Possible attributes include:

            *listen-backlog*::: The backlog queue limit for the instance.

            *disable-flush-all*::: If enabled, flush_all command will be disabled. Applicable to
            1.4.24 and higher.

            *max-item-size*::: Max bytes of the instnace. Must at least be equal to slab_chunk_max
            (which defaults to 524288 bytes) and less than 134217728 bytes. Additionally it must
            be a multiple of slab_chunk_max.

            *slab-min-size*::: This is an integer in the range [1, 1024].

            *slab-growth-factor*::: This is a float in the range [1.01, 100].

            *protocol*::: This is an enum with acceptable values of ["ascii", "auto"].

            *disable-cas*::: This is a boolean value.

            *disable-evictions*::: This is a boolean value.

            *max-reqs-per-event*::: This is an integer in the range [1, 1000].

            *track-sizes*::: This is a boolean value.

            *worker-logbuf-size*::: This is an integer in the range [48, 524288].

            *watcher-logbuf-size*::: This is an integer in the range [0, 2097151].

            *lru-crawler*::: This is a boolean value.

            *idle-timeout*::: This is an integer in the range [1,86400].

            *lru-maintainer*::: This is a boolean value.

            *maxconns-fast*::: This is a boolean value.

            *hash-algorithm*::: This is an enum with accepted values of ["jenkins", "murmur3"].
          type: "googlecloudsdk.command_lib.memcache.instances_util:Parameters"

  async:
    collection: memcache.projects.locations.operations

  request: &request
    collection: memcache.projects.locations.instances
    method: patch
    # --parameters flag uses the method `updateParameters`, all other flags use method `patch`
    modify_method_hook: googlecloudsdk.command_lib.memcache.instances_util:ChooseUpdateMethod
    # The two update methods uses different API calls with incompatible fields so we must create the
    # requests
    create_request_hook: googlecloudsdk.command_lib.memcache.instances_util:CreateUpdateRequest